Click here to Skip to main content
14,972,741 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hi friends ,

I have database temp.

Id (autoincrement) int
name varchar(50)
password varchar(50)

i insert one record using Procedure , then i want to fech that inserted record id which is autoincrement by sqlserver. How i can done above thing in project.

if you have any program related to this then plz help me.

Hiren Bhalsod

Imagine... If you had googled this (like I did), you wouldn't have had to wait for an answer...

The following line will tell you the last identity that was entered into the specified table.

thanx for the help , i used in procedure and it work but problem is in my .aspx page how i can get this value.


From JSOP: You can either return it (like you return a value in C#), or set an output parameter for your stored procedure. Google is your friend.


This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900