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


Please Help Members By Posting Answers For Below Questions

What are the advantages and disadvantages of using datalist?

522


describe the dataset object in ado.net.

520


What is the difference between Optimistic and Pessimistic locking?

538


Which object holds only data and does not interact with data source?

493


Which database is the ado.net sql connection object designed for?

585






What does ado stand for?

514


Which method in OLEDBAdapter is used to populate dataset with records?

557


Explain the various objects in dataset.

522


What is the namespaces being used to access oracle database?

511


If we are not returning any records from the database, which method is to be used?

737


How to find the given query is optimised one or not?

502


Give an example of a .net application which connects to microsoft access database using ado.net classes.

582


What is ado full form?

504


What are the different methods by which we can populate a dataset?

679


What is linq and entity framework?

511