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!

Re: How get Identity of newly added record without using Stored Procedure? by selimblock

selimblock
Mon Oct 25 11:05:33 CDT 2004

VB Programmer wrote:
> 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

Re: How get Identity of newly added record without using Stored Procedure? by Paul

Paul
Tue Oct 26 11:05:35 CDT 2004

On Mon, 25 Oct 2004 11:54:17 -0400, "VB Programmer" <Dont*NoSpam-Please*@jEmail.com> wrote:

¤ 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 ~~~ pclement@ameritech.net
Microsoft MVP (Visual Basic)