How to fetch the last inserted record in a particular table?
Answer Posted / muskaan
if(ds.Tables["tablename"].Rows.Count>0)
{
ds.Tables{"tablename"].Rows.Count-1;
}
| Is This Answer Correct ? | 3 Yes | 4 No |
Post New Answer View All Answers
What is dataset and datatable in ado.net?
Define different execute methods of ADO.NET command object ?
What is sqldatareader?
Explain About ado.net components/objects. Usage of data adapters and tell the steps to retrieve data.
In how many ways we can retrieve table records count? How to find the count of records in a dataset?
Explain why edit is not possible in repeater?
What are the advantages using ado.net?
Explain the architecture of ado.net?
What is acid in ado.net?
Explain how to find the given query is optimised one or not?
Explain the DataAdapter.Update() and DataSetAcceptChanges() methods.
What is the difference between typed and untyped dataset?
What is sqldatasource?
What is microsoft ado?
Is it possible to edit data in Repeater control?