sure thing. It's a built in value that returns the last *numeric*
identity (from the field set as primary key) inserted. have a look at
the following
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/tsqlref
/ts_globals_50u1.asp
Bear in mind that this gets the last ID inserted *only* - so if there's
concurrent updates you could be in trouble. Also it only copes with
numeric values....
Anna
_____
From: Moshe Tapnack [mailto:[EMAIL PROTECTED]
Sent: Friday, 2 July 2004 01:37
To: [EMAIL PROTECTED]
Subject: RE: [ASP] getting last ID
Yep, its an auto number.
Could you expand a little on this identity value? How is it
used?
Thanks!
Moshe
-----Original Message-----
From: Anna Crooks [mailto:[EMAIL PROTECTED]
Sent: Friday, July 02, 2004 4:28 AM
To: [EMAIL PROTECTED]
Subject: RE: [ASP] getting last ID
depends if its an auto number field or not. SQL Server has an
@@identity
value you can use.
Anna
_____
From: Moshe Tapnack [mailto:[EMAIL PROTECTED]
Sent: Friday, 2 July 2004 12:48
To: [EMAIL PROTECTED]
Subject: [ASP] getting last ID
hi!
in Access, when inserting a new record, all i had to do
was
strUserID = RS.Fields("ID")
before closing the RS, inorder to get that specific ID.
is this doable in SQL as well?
thanks!
Moshe
[Non-text portions of this message have been removed]
---------------------------------------------------------------------
Home :
http://groups.yahoo.com/group/active-server-pages
---------------------------------------------------------------------
Post : [EMAIL PROTECTED]
Subscribe : [EMAIL PROTECTED]
Unsubscribe:
[EMAIL PROTECTED]
---------------------------------------------------------------------
Yahoo! Groups Sponsor
ADVERTISEMENT
click here
<http://us.ard.yahoo.com/SIG=129cjqm6h/M=295196.4901138.6071305.3001176/
D=groups/S=1705115381:HM/EXP=1088815705/A=2128215/R=0/SIG=10se96mf6/*htt
p://companion.yahoo.com>
<http://us.adserver.yahoo.com/l?M=295196.4901138.6071305.3001176/D=group
s/S=:HM/A=2128215/rand=266819107>
_____
Yahoo! Groups Links
* To visit your group on the web, go to:
http://groups.yahoo.com/group/active-server-pages/
* To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
<mailto:[EMAIL PROTECTED]
ibe>
* Your use of Yahoo! Groups is subject to the Yahoo!
Terms
of Service <http://docs.yahoo.com/info/terms/> .
[Non-text portions of this message have been removed]
---------------------------------------------------------------------
Home : http://groups.yahoo.com/group/active-server-pages
---------------------------------------------------------------------
Post : [EMAIL PROTECTED]
Subscribe : [EMAIL PROTECTED]
Unsubscribe: [EMAIL PROTECTED]
---------------------------------------------------------------------
Yahoo! Groups Links
---------------------------------------------------------------------
Home : http://groups.yahoo.com/group/active-server-pages
---------------------------------------------------------------------
Post : [EMAIL PROTECTED]
Subscribe : [EMAIL PROTECTED]
Unsubscribe: [EMAIL PROTECTED]
---------------------------------------------------------------------
Yahoo! Groups Sponsor
ADVERTISEMENT
click here
<http://us.ard.yahoo.com/SIG=1296locvi/M=297844.5077745.6203885.3356155/
D=groups/S=1705115381:HM/EXP=1088818605/A=2196681/R=0/SIG=10v7of2am/*htt
p://www.target.com/careers>
<http://us.adserver.yahoo.com/l?M=297844.5077745.6203885.3356155/D=group
s/S=:HM/A=2196681/rand=425177462>
_____
Yahoo! Groups Links
* To visit your group on the web, go to:
http://groups.yahoo.com/group/active-server-pages/
* To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
<mailto:[EMAIL PROTECTED]
ibe>
* Your use of Yahoo! Groups is subject to the Yahoo! Terms
of Service <http://docs.yahoo.com/info/terms/> .
[Non-text portions of this message have been removed]
------------------------ Yahoo! Groups Sponsor --------------------~-->
Make a clean sweep of pop-up ads. Yahoo! Companion Toolbar.
Now with Pop-Up Blocker. Get it for free!
http://us.click.yahoo.com/L5YrjA/eSIIAA/yQLSAA/17folB/TM
--------------------------------------------------------------------~->
---------------------------------------------------------------------
Home : http://groups.yahoo.com/group/active-server-pages
---------------------------------------------------------------------
Post : [EMAIL PROTECTED]
Subscribe : [EMAIL PROTECTED]
Unsubscribe: [EMAIL PROTECTED]
---------------------------------------------------------------------
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/active-server-pages/
<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/