Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

How to fetch the last inserted record in a particular table?

Answer Posted / raji22559

CommanObject.CommandText="Select @@Identity";

** Note: Over a given connection if any insert statement is
executed on a table with identity column , the back end
sql-server for the connection initializes a parameter by
name "@@Identity" with the value of Identity column for the
last inserted record.

Is This Answer Correct ?    18 Yes 8 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is csdl entity framework?

969


What is dataset and datatable in ado.net?

924


Is entity framework better than ado.net?

928


What are the usages of the command object in ado.net?

966


Why do we need ado.net?

907


What is difference between executenonquery and executequery?

904


how can implement dropdownlist in particular of dataset when try to update?

2719


What is defaultview in datatable?

983


Give an example that shows how to execute a stored procedure in ado.net?

1010


What is difference in record set and dataset?

988


What is openquery?

922


What is ado net stands for?

906


What are the important features of ado.net 2.0?

1017


Why is stored procedure used in ado.net?

1029


What is the use of adodc?

938