Improve company productivity with a Business Account.Sign Up

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 544
  • Last Modified:

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

0
dilithiumtoys_dot_com
Asked:
dilithiumtoys_dot_com
2 Solutions
 
Paul JacksonSoftware EngineerCommented:
You're better using scope_identity see link:

http://msdn.microsoft.com/en-us/library/ms190315.aspx
0
 
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
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.

Join & Write a Comment

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now