How to find the count of records in a dataset?

Answer Posted / vaidyanathan r.

int count = 0
foreach(DataTable CurrTable in DataSet1.Tables)
Count += currTable.Rows.Count;

Is This Answer Correct ?    9 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How does ado.net work?

486


What is an ado?

514


How will you fill the gridview by using datatable object at runtime?

546


What are typed and untyped dataset?

546


What is a string variable?

478






Data reader read and forward only, how is it possible to get 2 tables of data at a time?

488


Define atomicity?

571


How can I retrieve two tables of data at a time by using data reader?

506


What are good ado.net object to replace to ado recordset object.

561


What is ado recordset?

490


Which is faster datareader or dataadapter?

519


How to copy the contents from one table to another table and how to delete the source table in ado.net?

515


What is basic use of data view?

503


How can we load multiple tables in a dataset?

532


Explain the difference between sqlcommand object and command behavior object?

527