Solved

SQL Server 2008 CLR Stored Procedure Insert

Posted on 2011-02-21
2
516 Views
Last Modified: 2012-05-11
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
Comment
Question by:dilithiumtoys_dot_com
2 Comments
 
LVL 29

Assisted Solution

by:Paul Jackson
Paul Jackson earned 75 total points
Comment Utility
You're better using scope_identity see link:

http://msdn.microsoft.com/en-us/library/ms190315.aspx
0
 
LVL 57

Accepted Solution

by:
Raja Jegan R earned 175 total points
Comment Utility
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

Featured Post

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

Long way back, we had to take help from third party tools in order to encrypt and decrypt data.  Gradually Microsoft understood the need for this feature and started to implement it by building functionality into SQL Server. Finally, with SQL 2008, …
If you have heard of RFC822 date formats, they can be quite a challenge in SQL Server. RFC822 is an Internet standard format for email message headers, including all dates within those headers. The RFC822 protocols are available in detail at:   ht…
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

771 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now