[thelist] ASP: @@Identity
Anthony Baratta
Anthony at Baratta.com
Fri Nov 10 16:12:29 CST 2000
At 01:24 PM 11/10/2000, you wrote:
>I use a trigger to insert into a second table instead of using @@Identity:
>
>it grabs the auto-created id and uses it to insert into the second table.
>Since @@Identity is a SERVER WIDE global variable, you can't be guaranteed
>of its value through the lifetime of your loop. In other words, some other
>process can change the @@Identity value without you knowing it.
Scott...
My understanding was that @@Identity was not global, but was specific to
your connection object and that other updates to the Database would not
step on the @@Identity you are trying to grab.
I do know that if you have triggers setup on the target table you are doing
the insert on, you don't end up with the @@Identity of the target file you
end up with the @@Identity of the last triggered insert of one of the other
tables.
Do you have any pointers to documentation that state @@Identity is global,
not connection specific?
----
Anthony Baratta
President
Keyboard Jockeys
More information about the thelist
mailing list