Hi,
I have a Stored Proc for inserting Data from the Web into a table with a Identity column.
i want to show back the autoNumber created to the User on successfull insert.
Please help!!
Never use @@identity to return the inserted value of a stored procedure. Scope_identity() will keep it to the scope of the stored procedure @@identity will not and will return the identity filed from another table if there is a trigger on the table that inserts to a second table with an identity value.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.