How to test if a DataSet is empty?
You don't have to test the dataset.
The Fill()
method returns the # of rows added.
See DbDataAdapter.Fill Method (DataSet)
If I understand correctly, this should work for you
if (ds.Tables[0].Rows.Count == 0)
{
//
}