If your using SQL you could write a Stored Procedure where the last line in
the procdure is
Select @@identity as WhatEverYouWantToCallIt
And then in your ASP code
SET RS = Conn.Execute("Exec SP_YourNewStoredProcdure
@Value1='Value1',@Value2='Value2'")
Then RS("WhatEverYouWantToCallIt) will equal your Autonumber value.
-----Original Message-----
From: Andy Hayman [mailto:[EMAIL PROTECTED]]
Sent: Thursday, September 12, 2002 10:57 AM
To: ActiveServerPages
Subject: Getting the AutoNumber ID
Ok I am writing using UPDATE to a record, but I need the unique autonumber
"ID" field the database has just created how do I get that? The only way I
can think of is to goto the last record, is there another waY?
---
Andy Hayman
Kensington Computers
Internet & Computers Systems Consultant
Web <http://www.ken.co.uk>
Email <mailto:[EMAIL PROTECTED]>
Telephone 020 7835 1282
Fax: 020 7373 6900
Disclaimer
This e-mail is confidential and intended solely for the use of the
individual to whom it is addressed. Any views or opinions presented are
solely those of the author and do not represent those of Kensington
Computers. If you are not the intended recipient, be advised that you have
received this mail in error and that any use, dissemination, forwarding,
printing or copying of this e-mail is strictly prohibited.
---
You are currently subscribed to activeserverpages as: [EMAIL PROTECTED]
To unsubscribe send a blank email to
%%email.unsub%%
---
You are currently subscribed to activeserverpages as: [email protected]
To unsubscribe send a blank email to [EMAIL PROTECTED]