Pages

Ads 468x60px

HOW GET ID OF LAST INSERTED RECORD

Intro:- 
This small article is based on a situation where you need the ID of your latest inserted record.
means one every insert you want to get the ID of the inserted record by which you can know that record inserted successfully or not and can use its ID for other purpose. There are many way to achieve this. But here we will use output parameter
and in our c# code behind we will use
SqlParameter with Direction property

Here is our procedure


This is our code behind (.cs) file where we getting @getID value

No comments:

Post a Comment