How to test if a DataSet is empty? April 14, 2023 by Tarik If I understand correctly, this should work for you if (ds.Tables[0].Rows.Count == 0) { // }