update from statement (OledbCommand)

1 year 8 months ago #13852 by kristinh
I just switched from using the MS OleDB driver and access to the TRIAL VERSION of PGNP and postgres 9.4. I was thrilled that all my code works "as-is" -- except for ONE statement. I keep getting an error that seems obvious, but has had me spinning for days. I've checked and double-checked all my types in the database, I have copied the command and variables into a postgres SQL window and it runs clean, I've done an Explain Plan to confirm type use, I've commented out some parameters and hardcoded others...no matter what I do, I get the same error. Is there a length limitation to statements in the trial version of PGNP? Can't think of any other cause. This query works against postgres with an ODBC driver, and against access (if you tweak the FROM part to Access syntax) with the MS OLEDB driver. Suggestions?

System.Data.OleDb.OleDbException (0x80040E14): ERROR: operator does not exist: integer = character varying
LINE 1: ...inkSector2DoD.LaydownID_FKey)) AND Sector.SectorID=$3 AND Se...
HINT: No operator matches the given name and argument type(s). You might need to add explicit type casts.

Please Log in or Create an account to join the conversation.

1 year 8 months ago #13853 by Moderator
This is parameter type issue. The column is of type int, and the passed parameter is a string.

Either change the parameter type to int, or send us (support at pgoledb) additional information on how to reproduce the issue.

Please Log in or Create an account to join the conversation.

Time to create page: 0.602 seconds
Powered by Kunena Forum