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?