Apr 8, 2003 #1 Y yaniv Well-known member Joined Apr 15, 2002 Messages 162 Location israel 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?
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?
Apr 8, 2003 #2 Nerseus Danner Joined Oct 22, 2002 Messages 2,547 Location Arizona, USA User Rank *Expert* You can check the DataTables Rows.Length (or is it Count?) property. Assume you have a table in your dataset named "Table1": C#: if(ds.Tables["Table1"].Rows.Length > 0) { // You have data } else { // You have no data } -Nerseus
You can check the DataTables Rows.Length (or is it Count?) property. Assume you have a table in your dataset named "Table1": C#: if(ds.Tables["Table1"].Rows.Length > 0) { // You have data } else { // You have no data } -Nerseus
Apr 8, 2003 #3 Robby Moderator Joined Nov 17, 2002 Messages 3,461 Location Montreal, Ca. User Rank *Expert* I think its count.. ds.Tables(0).Rows.Count
Apr 9, 2003 #4 Y yaniv Well-known member Joined Apr 15, 2002 Messages 162 Location israel Well, it was Count indeed. thanks guys.