Using @@Identity or Scope_Identity in Access

J

James

Hello

Can this be done? If so how? I have seen some articles saying it can but
they are from 1999 and the code no longer works. Or is there another way of
getting the primary key for the record just inserted?

Thanks
James
 
R

Ray Costanzo

Last time I used Access, which is a number of years back, there was no
@@identity concept still. In the days of classic ASP, one of the ways to do
this in a 100% reliable way was to use a clinky recordset object, set the
values, and insert it. You'd still have that connected recordset available,
and could then read the ID column from that same record. Similar logic
could be applied with ADO.Net, I'd imagine.

Ray at home
 
J

James

Hi

Thanks for your response, do you have an example or a link to where I could
get one? Im trying to insert Firstname, Lastname, Email, and the autonumber
is memberID.

Many thanks
James
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,184
Messages
2,570,979
Members
47,580
Latest member
kim2namjoon

Latest Threads

Top