From: Warren Brown Date: 2004-07-29T08:37:14+09:00 Subject: Re: [Not so?] Stupid ODBC! Lennon, > there appears to be no standard way of getting an identifier > for the last row inserted. > ... > Does anyone have a general solution for this they've used > (or seen described/mentioned) elsewhere? Check out the "IdentifierType = SQL_BEST_ROWID" parameter of the ODBC SQLSpecialColumns function. The MS reference is here: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/odbc/ht m/odbcsqlspecialcolumns.asp. This function returns the column or columns that uniquely identify each row in a table. These columns are guaranteed to work in a WHERE clause. If there are no columns that uniquely identify a row in the table, the function returns an empty "rowset". This was introduced in ODBC 1.0, so it should be available everywhere. I have never used it myself, but it sounds like exactly what you are looking for. I'm guessing this will help :o) - Warren Brown