even better!!!

-----Original Message-----
From: Paul Johnston [mailto:[EMAIL PROTECTED]
Sent: 05 February 2004 08:44
To: [EMAIL PROTECTED]
Subject: RE: [ cf-dev ] Adding to two tables and inserting a
transferring a value


> You can get @@ identity without an SP, just do another select 
> right after the insert
> 
> Select @@identity from table

Although remember that if there is an insert done right before the
select @@identity, you will receive the wrong result.

Put the INSERT and SELECT @@identity in a transaction and you'll be ok!

Paul



-- 
** Archive: http://www.mail-archive.com/dev%40lists.cfdeveloper.co.uk/

To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
For human help, e-mail: [EMAIL PROTECTED]


-- 
** Archive: http://www.mail-archive.com/dev%40lists.cfdeveloper.co.uk/

To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
For human help, e-mail: [EMAIL PROTECTED]

Reply via email to