The other responses got it right but you probably want to either enclose
both these statements in a transaction tag either on the sql side in a
stored procedure or on the cold fusion side because someone could add
another record to the table between your two statements and then you would
get the wrong id.

John

-----Original Message-----
From: Kola Oyedeji [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, May 15, 2001 10:42 AM
To: CF-Talk
Subject: OT: @@identidy in sql server 7



Can anyone please remind me how i get the value of a record
which was just inserted into a sql database. I know its called @@identidy.

I had a snippet but i cant find it,Thanks

KOla
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to