tags:

views:

231

answers:

1

Having just called Update() on an MFC CRecordset (ODBC/Dynaset) what can I do to pull the auto-generated ID without hitting the database again? Ideally whatever it is would work in both SQL Server and MS Access (so querying for the last identity might not work...)

+1  A: 

Can't be done. It's necessary to hit the database a second time to pull the @@Identity. Bummer.

RG