Gustav Brock
gustav at cactus.dk
Fri May 9 03:35:47 CDT 2003
Hi Andrew and Stuart et al I'm confused! Andrew wrote: It is safer as @@Identity is linked only to the connection (or transaction) which created the record. Otherwise you are risking that another user will insert a record in-between adding and retrieving the ID of the record added by the first user. I'm not sure if that is a risk using the other methods mentioned on this list, however I *do* now that with @@Identity there is no risk of this happening. but Stuart wrote: > @@Identity is a system wide variable. It returns the last autonumber > generated by the system. You certainly can't rely on it to return a > particular record number in either a multi user system or in a system > where you are inserting into more than one table with autonumbers > keys in the same transaction. So now, what to believe? /gustav