X-Original-To: pgsql-odbc@postgresql.org Received: from spampd.localdomain (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 9DFAB476128 for ; Thu, 10 Apr 2003 16:28:24 -0400 (EDT) Received: from m3-cluster1.vcn.com (m3-cluster1.vcn.com [209.193.72.33]) by postgresql.org (Postfix) with ESMTP id 84C35476032 for ; Thu, 10 Apr 2003 16:28:23 -0400 (EDT) Received: from sweetbeet2k (unverified [209.193.70.230]) by m3-cluster1.vcn.com (Vircom SMTPRS 5.3.232) with ESMTP id ; Thu, 10 Apr 2003 14:28:24 -0600 Message-ID: <008a01c2ff9f$bca0c150$a1d2a8c0@impsu.net> From: "Hollysugar Webmaster" To: "Dave Page" , "Hiroshi Inoue" Cc: References: <03AF4E498C591348A42FC93DEA9661B8259F40@mail.vale-housing.co.uk> Subject: New problem with sqlsetpos -->support for adding rows? Date: Thu, 10 Apr 2003 14:28:24 -0600 MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_0087_01C2FF6D.71B54B20" X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1106 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 X-Spam-Status: No, hits=-6.4 required=5.0 tests=BAYES_30,HTML_20_30,HTML_FONT_COLOR_BLUE,REFERENCES autolearn=ham version=2.50 X-Spam-Level: X-Spam-Checker-Version: SpamAssassin 2.50 (1.173-2003-02-20-exp) X-Archive-Number: 200304/29 X-Sequence-Number: 2831 This is a multi-part message in MIME format. ------=_NextPart_000_0087_01C2FF6D.71B54B20 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MessageGentlemen, First of all thank you for all of your patience and help on this project. W= e were able to get sqlsetpos to work for updating the postgresql tables whe= n 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 f= irst user column in a table. When we created the table without oids and add= ed oid as the first column with default value of 0 (as required by the mobi= le 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 wh= en synced have them added to the postgresql database. When we try this oper= ation we get the error code "row value out of range" since sqlsetpos is loo= king for the 41st row when there are only 40 rows. I found the following information on Microsoft's site regarding sqlsetpos a= nd adding new rows into a table. 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 compatibilit= y. 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 Oper= ation of SQL_ADD to SQLSetPos with an Operation of SQL_ADD. Any suggestions on what I need to do to make this process work? Julie ------=_NextPart_000_0087_01C2FF6D.71B54B20 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Message
Gentlemen,
 
First of all thank you for all of your pat= ience and=20 help on this project. We were able to get sqlsetpos to work for updating th= e=20 postgresql tables when data was altered on the mobile device and synced usi= ng=20 the odbc interface.
 
The problem with updating the postgresql= =20 database was related to the use of oid's. The mobile database we are u= sing=20 requires an oid column to be the first user column in a table. When we crea= ted=20 the table without oids and added oid as the first column with default value= of 0=20 (as required by the mobile database) the sqlsetpos function could not ident= ify=20 where it was located and exited out of the odbc call.
 
Our issue now is in trying to add new reco= rds to=20 the mobile database and when synced have them added to the postgresql datab= ase.=20 When we try this operation we get the error code "row value out of range" s= ince=20 sqlsetpos is looking for the 41st row when there are only 40 rows.
 
I found the following information on Micro= soft's=20 site regarding sqlsetpos and adding new rows into a table.
 
<microsoft info=20 src=3D"http://msdn.microsoft.com/library/default.asp?url=3D/library/en-us/o= dbc/htm/odglosspr.asp">
 
The SQL_ADD value for the Operation argument has been deprecate= d for=20 ODBC 3.x. ODBC 3.x drivers will need to support SQL_ADD for= =20 backward compatibility. This functionality has been replaced by a call to= =20 SQLBulkOperations with an Operation of SQL_ADD. When an ODBC= =20 3.x application works with an ODBC 2.x driver, the Driver Man= ager=20 maps a call to SQLBulkOperations with an Operation of SQL_ADD= to=20 SQLSetPos with an Operation of SQL_ADD.
 
</microsoft info>
 
Any suggestions on what I need to do to ma= ke this=20 process work?
 
Julie
 
 
<= /HTML> ------=_NextPart_000_0087_01C2FF6D.71B54B20--