I'm modifying someone else's code where a query is performed using the following:
DataSet ds = new DataSet(); SqlDataAdapter da = new SqlDataAdapter(sqlString, sqlConn); da.Fill(ds);
How can I tell if the DataSet is empty (i.e. no results were returned)?
Empties a ProDataSet object of all records in its associated temp-tables.
If I understand correctly, this should work for you
if (ds.Tables[0].Rows.Count == 0) { // }
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With