syntax error at or near ":"
-
- Posts: 21
- Joined: Wed 10 Sep 2008 20:29
syntax error at or near ":"
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();
}
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();
}
-
- Posts: 21
- Joined: Wed 10 Sep 2008 20:29
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.Shalex wrote:Sorry for inconvenience, but we need more time to process this request.
-
- Posts: 21
- Joined: Wed 10 Sep 2008 20:29
-
- Posts: 21
- Joined: Wed 10 Sep 2008 20:29
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.AndreyR wrote:Follow the announcements on our forum.
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
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