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 IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How can I get the primary key from a newly inserted record

Status
Not open for further replies.

Guru2B

Programmer
May 24, 2000
77
GB
Hi,

I have an object that writes a record to an Access DB. I'd like to know if there is a way to get the primary key for this newly added record at the time the object is written.

I am using ADO 2.5 with VB 6.0 I know that with DAO, I was able to get the value before calling the update method, but this doesn't seem to work with ADO.

Please help.
Thanks.
 
I did it by adding a time field then calling where time equals (display number)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top