>even with teh same connection?
Yes, even with the same connection. If you INSERT a record on a table that
does not have an insert trigger, the @@IDENTITY value you get back from Sql Server will be correct. It is not effected by other connections.
If you INSERT a record on a table that
does have an insert trigger, that trigger may update the @@IDENTITY value, giving you an incorrect value back.
Of course, this is not a problem if your tables do not have insert triggers that effect the @@IDENTITY value.
Chris McCandless
Red Sky Software