Getting count of results...

mixbox

New Member
I am doing a simple data binding to a radio button group, if the results set that comes back is less than 2 I want to turn off the table.<BR><BR>So, here is the code I am using...<BR><BR>Dim myAdapter As New SqlDataAdapter("SELECT * FROM table", MyConnection)<BR>Dim myDataSet As DataSet<BR>myDataSet = New DataSet<BR>myAdapter.Fill(myDataSet, "Door")<BR>door.DataSource = myDataSet<BR>door.DataBind()<BR><BR>...what command should I use to then either check the radio group (door) or check the dataset to see if the results contain more than one result?<BR><BR>Thanks,<BR>Mattuse this to get the number of records returned<BR>door.Rows.Count<BR><BR><BR>hth<BR>mattAwesome...for a drop down it is door.items.count but it was your answer that got me that info...thanks a million, was driving me nuts.if (ds.Tables["door"].Rows.Count > 1){<BR>//do something<BR>}
 
Back
Top