SQL Server 2008 CLR Stored Procedure Insert

Hi,

I am not sure how to receive the @@identity variable from sql server when I execute through a CLR Stored Procedure. Could someone give me an example or point me in the right direction

Thanks

dilithiumtoys_dot_comAsked:
Who is Participating?
 
Raja Jegan RSQL Server DBA & ArchitectCommented:
In CLR, instead of @@Identity use SELECT SCOPE_IDENTITY() to get the same output

Kindly go through the thread below and especially the last one which would be of interest to you..
http://www.bigresource.com/Tracker/Track-ms_sql-8t5Yvti6/
0
 
Paul JacksonSoftware EngineerCommented:
You're better using scope_identity see link:

http://msdn.microsoft.com/en-us/library/ms190315.aspx
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.