yaniv Posted April 8, 2003 Posted April 8, 2003 MY dataset is built on a query that can return no values at all. can i check if it is empty before i"m starting to suck the data? Quote
*Experts* Nerseus Posted April 8, 2003 *Experts* Posted April 8, 2003 You can check the DataTable's Rows.Length (or is it Count?) property. Assume you have a table in your dataset named "Table1": if(ds.Tables["Table1"].Rows.Length > 0) { // You have data } else { // You have no data } -Nerseus Quote "I want to stand as close to the edge as I can without going over. Out on the edge you see all the kinds of things you can't see from the center." - Kurt Vonnegut
Moderators Robby Posted April 8, 2003 Moderators Posted April 8, 2003 I think it's count.. ds.Tables(0).Rows.Count Quote Visit...Bassic Software
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.