Link to home
Start Free TrialLog in
Avatar of mdwyer
mdwyer

asked on

ADO - ? autonumber after update

Using ADO  2.0  and Access 97 - How can you find out what the autonumber  id of a record just added is? There is no Lastmodified property for an ADO recordset.
Avatar of vbWhiz
vbWhiz

I personally never use the autonumber feature of any database. You can check out my answer to Q.10104529, my sample uses another table to hold the last used ID for a given table. By using your own ID number routine you have more control of the ID's and a number won't be re-used if the record is deleted and the database is compacted.

URL for Q.10104529:

https://www.experts-exchange.com/topics/comp/lang/vbdatabases/Q.10104529

[-Note- the sample uses DAO - so I am performing a seek rather than opening a resultset but the concept is there.]
ASKER CERTIFIED SOLUTION
Avatar of hakyemez
hakyemez
Flag of Türkiye image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of mdwyer

ASKER

As it turrns out - I was originally specifying a CursorLocation of adUseClient for my recordset . I switched to adUseServer and my autonumber ID was then visible after  the update method.