How get Identity of newly added record without using Stored Procedure?

V

VB Programmer

I am using ADO.NET to insert a record into an ACCESS database.

How do I get the Identity of the newly added record without using a stored
proc?

Thanks!
 
?

=?ISO-8859-1?Q?S=E9lim?=

VB said:
I am using ADO.NET to insert a record into an ACCESS database.

How do I get the Identity of the newly added record without using a stored
proc?

Thanks!
Just execute straight after SELECT MAX(ID_FIELD) FROM TABLE_NAME

Selim
 
P

Paul Clement

¤ I am using ADO.NET to insert a record into an ACCESS database.
¤
¤ How do I get the Identity of the newly added record without using a stored
¤ proc?

See the following:

HOW TO: Retrieve the Identity Value While Inserting Records into Access Database By Using Visual
Basic .NET
http://support.microsoft.com/default.aspx?scid=kb;en-us;815629


Paul ~~~ (e-mail address removed)
Microsoft MVP (Visual Basic)
 

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

Top