Using @@Identity or Scope_Identity in Access

  • Thread starter Thread starter James
  • Start date Start date
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
 
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
 
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
 
Back
Top