From: Hollysugar Webmaster <webmaster@hollysugar.com>
To: Dave Page <dpage@vale-housing.co.uk>
To: Hiroshi Inoue <inoue@tpf.co.jp>
Cc: pgsql-odbc@postgresql.org
Subject: New problem with sqlsetpos -->support for adding rows?
Date: Thu, 10 Apr 2003 14:28:24 -0600
Message-ID: <008a01c2ff9f$bca0c150$a1d2a8c0@impsu.net> (raw)
References: <03AF4E498C591348A42FC93DEA9661B8259F40@mail.vale-housing.co.uk>
MessageGentlemen,
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-odbc@postgresql.org
Cc: webmaster@hollysugar.com, dpage@vale-housing.co.uk, inoue@tpf.co.jp
Subject: Re: New problem with sqlsetpos -->support for adding rows?
In-Reply-To: <008a01c2ff9f$bca0c150$a1d2a8c0@impsu.net>
References: <03AF4E498C591348A42FC93DEA9661B8259F40@mail.vale-housing.co.uk> <008a01c2ff9f$bca0c150$a1d2a8c0@impsu.net>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox