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
Is entity framework better than ado.net?
What is ado and rdo?
How do you find the count of records in a dataset?
differences between ADO and ADO.NET
The answers which posted above is not satisfied my requirement? Can some one post teh exact answer? Thanx
What is ado.net tutorial?
Which property is used to check whether a DataReader is closed or opened?
How to connect and retrieve data from database using dataset
What is adodb dll?
What is ado.net and its features?
How to Read, Add, Update and Delete record in Entity Framework ?
What is difference between executequery and executeupdate?
Define connection string?
What are dcl commands?
What is ado data control?