logo       

Sponsor
FREE Network Mapping Tool for Microsoft® Office Visio® Professional 2007
Don't map your network by hand - let LANsurveyor Exx press for Microsoft Visio Professional 2007 automatically create network diagrams for you!

Re: @@IDENTITY (Was: Access - ODBC - serial problem): msg#00078

db.postgresql.odbc

Subject: Re: @@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.
>
> Anyway, what the original conversation was about was getting back the
auto
> increment value from pgsql via ODBC with access on top. The problem
being
> that postgresql doesn't have a simple "what was the autoincrement I
just put
> in" but requires the user to either use the system catalogs to look up
the
> sequence name and then use currval on it, or something like a plpgsql
function
> to insert your data.

-----------

Without a way of getting the autoincrement from the ODBC driver, there
will always be cases, when adding data to a table through a linked
table, where the data that appears onscreen is not the one that has been
added to the table. And this until you requery the whole table.

- After an insert, Microsft ODBC driver issues a "SELECT @@IDENTITY".

- 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.

Is there anything that can be done at the driver level?


---------------------------(end of broadcast)---------------------------
TIP 9: the planner will ignore your desire to choose an index scan if your
joining column's datatypes do not match



<Prev in Thread] Current Thread [Next in Thread>
Sponsor
FREE Network Mapping Tool for Microsoft® OfficeVisio Professional 2007
Don't map your network by hand - let LANsurveyor Express for Microsoft Visio Professional 2007
automatically create network diagrams for you!
Google Custom Search

Free Magazines

Cisco News
Receive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business.
subscribe

Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field.
subscribe

The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business.
subscribe

Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company.
subscribe

Total Telecom Total Telecom is "The Economist of the communications industry".
subscribe

Navigation

Home | sitemap | advertise | OSDir is an inevitable website. super tiny logo