craigdev
asked on
Scope Identity on remote server
My stored procedure does an insert command to a table with identity(1,1) on a remote server using a synonym.
How can I get the ID of the record that was just inserted? Scope_Identity() doesn't work, is there any alterative? I can't create an SP on the remote server so that's out of the question.
Is there any other way?
How can I get the ID of the record that was just inserted? Scope_Identity() doesn't work, is there any alterative? I can't create an SP on the remote server so that's out of the question.
Is there any other way?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
what abt IDENT_CURRENT
Why dont you create a stored procedure on the remote server which inserts and returns the identity value thru an output variable. then you can create a synonym to that sp and call it from ur local sp
ASKER
I can't create an SP on the remote server so that's out of the question.
ASKER
bs
ASKER