Solved

scope_identity()

Posted on 2006-06-19
3
549 Views
Last Modified: 2007-12-19
I have a formview with an iteminsert template. In the data source configuration I have set the insert method to point to a stored procedure that returns the scope_identity() value. The insert statement is automatically run when the user hits the insert button.

I need to retrieve this value from the item_inserted method.

Is this possible, or do I manually have to run the stored procedure in order to retrieve the return value.
0
Comment
Question by:Contestoas
3 Comments
 
LVL 27

Accepted Solution

by:
Sammy earned 500 total points
ID: 16940112
You can do it using direction for the sql parameter object
take a look at the last example
http://aspnet.4guysfromrolla.com/articles/062905-1.aspx

HTH
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

This article discusses the ASP.NET AJAX ModalPopupExtender control. In this article we will show how to use the ModalPopupExtender control, how to display/show/call the ASP.NET AJAX ModalPopupExtender control from javascript, how to show/display/cal…
A quick way to get a menu to work on our website, is using the Menu control and assign it to a web.sitemap using SiteMapDataSource. Example of web.sitemap file: (CODE) Sample code to add to the page menu: (CODE) Running the application, we wi…
This is used to tweak the memory usage for your computer, it is used for servers more so than workstations but just be careful editing registry settings as it may cause irreversible results. I hold no responsibility for anything you do to the regist…
As a trusted technology advisor to your customers you are likely getting the daily question of, ‘should I put this in the cloud?’ As customer demands for cloud services increases, companies will see a shift from traditional buying patterns to new…

920 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

17 Experts available now in Live!

Get 1:1 Help Now