Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How To Obtain the ID Number of a Record Inserted w/Parameter Query

Status
Not open for further replies.

Guru2B

Programmer
May 24, 2000
77
GB
Hi!

I am trying to find the answer to this one...

I have changed all my hard coded SQL queries to parameter queries stored in the DB and am using one of these wonderful things to insert a new record into a table.

With my old way of doing things, the task of obtaining the ID of the newly inserted record was as simple as reading the rs!ID field after rs.update.

How, with these new fangled parameter and command objects can I accomplish the same task.

Please help,
Guru2B
 
Assumming a JET MDB:

Try using a SELECT statement with @@Identity (JET MDB 4.0).
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top