How To Retrieve Identity Column After Insert Using ODBCDirect (177736)
The information in this article applies to:
- Microsoft Visual Basic Professional Edition for Windows 5.0
- Microsoft Visual Basic Enterprise Edition for Windows 5.0
This article was previously published under Q177736 SUMMARY SQL Server Identity columns automatically increment their
value when a new record is added to the table, which makes them very useful for
a unique primary key. SQL Server maintains an environment variable named
@@IDENTITY that stores the value of the last Identity column added and can be
queried several different ways. This article demonstrates how the value of the
Identity column is retrieved from the SQL Server Pubs database using
ODBCDirect. REFERENCES For additional information, please see the following
article in the Microsoft Knowledge Base: 170147 : How To Retrieve Identity Column After Insert Using RDO
(c) Microsoft Corporation 1997, All Rights Reserved.
Contributions by Adrian Chiang, Microsoft Corporation
Modification Type: | Minor | Last Reviewed: | 7/1/2004 |
---|
Keywords: | kbhowto KB177736 |
---|
|