New problem with sqlsetpos -->support for adding rows? - Mailing list pgsql-odbc

From Hollysugar Webmaster
Subject New problem with sqlsetpos -->support for adding rows?
Date
Msg-id 008a01c2ff9f$bca0c150$a1d2a8c0@impsu.net
Whole thread Raw
In response to Re: problems with sqlsetpos -->having odbc intercept alter command  ("Dave Page" <dpage@vale-housing.co.uk>)
List pgsql-odbc
Gentlemen,
 
First of all thank you for all of your patience and help on this project. We were able to get sqlsetpos to work for updating the postgresql tables when data was altered on the mobile device and synced using the odbc interface.
 
The problem with updating the postgresql database was related to the use of oid's. The mobile database we are using requires an oid column to be the first user column in a table. When we created the table without oids and added oid as the first column with default value of 0 (as required by the mobile database) the sqlsetpos function could not identify where it was located and exited out of the odbc call.
 
Our issue now is in trying to add new records to the mobile database and when synced have them added to the postgresql database. When we try this operation we get the error code "row value out of range" since sqlsetpos is looking for the 41st row when there are only 40 rows.
 
I found the following information on Microsoft's site regarding sqlsetpos and adding new rows into a table.
 
<microsoft info src="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/odbc/htm/odglosspr.asp">
 
The SQL_ADD value for the Operation argument has been deprecated for ODBC 3.x. ODBC 3.x drivers will need to support SQL_ADD for backward compatibility. This functionality has been replaced by a call to SQLBulkOperations with an Operation of SQL_ADD. When an ODBC 3.x application works with an ODBC 2.x driver, the Driver Manager maps a call to SQLBulkOperations with an Operation of SQL_ADD to SQLSetPos with an Operation of SQL_ADD.
 
</microsoft info>
 
Any suggestions on what I need to do to make this process work?
 
Julie
 
 

pgsql-odbc by date:

Previous
From: "Wayne Armstrong"
Date:
Subject: Re: Parse statement can fail for unquoted uppercase tablenames
Next
From: "Wayne Armstrong"
Date:
Subject: Parse Statement causes a "hang" in crystal reports