syntax error at or near ":"

syntax error at or near ":"

Postby tomcat2001 » Fri 31 Oct 2008 18:39

We are getting the error: syntax error at or near ":"
ErrorCode 42601
FileName "scan.l"
LineNumber 795
Position 76
ProcedureName "base_yyerror"


I am attempting to use the parameterized queries and having some issues. Here is part of the code I'm using. See if anything would appear wrong. We seem to be having problems when the data contains one of the following 2 characters: ` or ". Now if the data contains 2 of these instead of 1, it works fine. I'm looking for a way around this as it's really killing us right now. This only happens in parameterized queries as a similar query without the parameterized part works fine.

using (PgSqlConnection connection = GetNewConnectionAndOpen())
{
PgSqlCommand command = new PgSqlCommand();
command.CommandText = string.Format("Update {0} Set LastName={1},Picture={2} Where PatientID = {3};",
"soapware_charts_generaldemographics",
"'test123\"'",
":Picture",
"'cb35523d-955c-46e0-9eb8-a9c5a6cce2db'");

command.Connection = connection;

PgSqlParameter param = new PgSqlParameter();
param.ParameterName = "Picture";
param.Value = null;
param.DbType = DbType.Binary;

command.Parameters.Add(param);

command.ExecuteNonQuery();
}


If however I use 2 double quote characters it works fine.

using (PgSqlConnection connection = GetNewConnectionAndOpen())
{
PgSqlCommand command = new PgSqlCommand();
command.CommandText = string.Format("Update {0} Set LastName={1},Picture={2} Where PatientID = {3};",
"soapware_charts_generaldemographics",
"'\"test123\"'",
":Picture",
"'cb35523d-955c-46e0-9eb8-a9c5a6cce2db'");

command.Connection = connection;

PgSqlParameter param = new PgSqlParameter();
param.ParameterName = "Picture";
param.Value = null;
param.DbType = DbType.Binary;

command.Parameters.Add(param);

command.ExecuteNonQuery();
}
tomcat2001
 
Posts: 21
Joined: Wed 10 Sep 2008 20:29

Postby AndreyR » Mon 03 Nov 2008 11:53

Thank you for the bug report.
We have reproduced the error and now we are investigating the problem.
AndreyR
Devart Team
 
Posts: 2919
Joined: Mon 07 Jul 2008 13:16

Postby tomcat2001 » Fri 05 Dec 2008 14:40

I'm wondering what the status of this is?
tomcat2001
 
Posts: 21
Joined: Wed 10 Sep 2008 20:29

Postby Shalex » Tue 09 Dec 2008 11:26

Sorry for inconvenience, but we need more time to process this request.
Shalex
Devart Team
 
Posts: 7654
Joined: Thu 14 Aug 2008 12:44

Postby tomcat2001 » Mon 15 Dec 2008 21:40

Shalex wrote:Sorry for inconvenience, but we need more time to process this request.


I'm sorry but this is a pretty major problem for us and we need a solution ASAP. We've been stuck telling our users some things, but this is out of hand. We paid for a tool that will let us connect to PostgreSQL and now this is something you've been able to reproduce and it's a pretty major issue with a character in the text causing it. I expect to be hearing from somebody real soon on a release to check out.
tomcat2001
 
Posts: 21
Joined: Wed 10 Sep 2008 20:29

Postby AndreyR » Wed 17 Dec 2008 13:06

The problem is solved, look forward to the next build.
AndreyR
Devart Team
 
Posts: 2919
Joined: Mon 07 Jul 2008 13:16

Postby tomcat2001 » Wed 17 Dec 2008 13:13

It looks like 4.00 is the current version. So I guess whatever the next version is? 4.01 or something like that?
tomcat2001
 
Posts: 21
Joined: Wed 10 Sep 2008 20:29

Postby AndreyR » Wed 17 Dec 2008 13:51

Follow the announcements on our forum.
AndreyR
Devart Team
 
Posts: 2919
Joined: Mon 07 Jul 2008 13:16

Postby tomcat2001 » Wed 14 Jan 2009 14:52

AndreyR wrote:Follow the announcements on our forum.


I've been kind of following this, but nothing yet and it's been a month. Is there some kind of vague estimate so I have some idea. So maybe february or march or this month. I understand that you all need to make sure the build is good and not putting out something with issues, but we're just sitting around waiting for something to help us out.
tomcat2001
 
Posts: 21
Joined: Wed 10 Sep 2008 20:29

Postby Shalex » Thu 15 Jan 2009 15:04

The new build (4.00.20) of dotConnect for PostgreSQL is available now.
It can be downloaded from http://www.devart.com/dotconnect/postgr ... nload.html (trial version) or from Registered Users Area (for users with valid subscription only).

For more information, please visit: http://www.devart.com/forums/viewtopic.php?t=13900
Shalex
Devart Team
 
Posts: 7654
Joined: Thu 14 Aug 2008 12:44


Return to dotConnect for PostgreSQL