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 is difference between sqldatareader and sqldataadapter?

695


Does ado.net use odbc?

695


Which property is used to check whether a DataReader is closed or opened?

796


What are the different namespaces used in the project to connect the database? What data providers available in .net to connect to database?

1011


What is the use of adodc?

731


What Is Difference Between Ado And Ado.net?

759


What is ado.net object model?

712


Explain ado.net features? Benefits? Drawbacks?

791


What is difference between ado.net and asp net?

743


How to work with disconnected data - the dataset and sqldataadapter?

724


What does sqldatareader return?

698


Explain the various objects in dataset.

717


What is data relation in ado.net?

716


What is the difference between executequery and executenonquery?

701


Which is better ole db or odbc?

676