is dataset empty

  • Thread starter Thread starter Rock
  • Start date Start date
R

Rock

How can you tell if a dataset is empty or has no records?? In vb 6 you used
to be able to say if recordset.eof is true...
 
A DataSet can have 0-N DataTables. If there are no DataTables, there is no
data. If the Ds.Tables(0).Rows.Count is 0, there are no rows in the first
table. Each table in the Dataset can be checked in a similar fashion.

--
____________________________________
William (Bill) Vaughn
Author, Mentor, Consultant
Microsoft MVP
www.betav.com
Please reply only to the newsgroup so that others can benefit.
This posting is provided "AS IS" with no warranties, and confers no rights.
__________________________________
 
DataSets have a Tables collection and you can check if a given table is
empty by looking at its Rows Collection

DataSetName.Tables[TableindexOrName].Rows.Count == 0;
 
Back
Top