> -----Original Message-----
> From: Philippe Lang [mailto:philippe(dot)lang(at)attiksystem(dot)ch]
> Sent: 10 April 2004 09:59
> To: pgsql-odbc(at)postgresql(dot)org
> Cc: scott.marlowe
> Subject: Re: [ODBC] @@IDENTITY (Was: Access - ODBC - serial problem)
> > For reasons unfathomable to modern man, Microsoft chose
> @@IDENTITY to mean, not the current user, as I or you or any
> sane person would expect, but to hold the incremented value of
> an autoincrementing column fed by an insert.
> Another triumph in orthogonally named things from Microsoft.
Ahh, that was some good thinking on their part, though it does sorta
> - After an insert, Postgresql ODBC driver reads the data
> based on the values that have been inserted. There are cases
> were these values already existed in the table before the
> insert, and so the autoincrement fetched may not be correct.
It does? I wasn't aware of that. I assume you mean when using cursors
(which I never use) as it doesn't following a regular insert statement.
> Is there anything that can be done at the driver level?
Standard answer: The best method would be to do a "SELECT
currval('seq_name');" when required on the relevant sequence.
pgsql-odbc by date
|Next:||From: Dave Page||Date: 2004-04-10 21:21:08|
|Subject: Re: fixes for psqlodbc-07.03.200, patch|
|Previous:||From: Bruce Momjian||Date: 2004-04-10 19:40:55|
|Subject: Re: ODBC driver further developments?|