Hello,
Is there an easy way to determine the number of rows created when creating a data adapter (see code below). I'd like to know if the sql produces any rows. Is there a property of the data adapter that records the number of rows.
OdbcCommand
DbCommand = new OdbcCommand("SELECT x,y FROM DATA_y WHERE x='z', DbConnection); OdbcDataAdapter myDataAdapter = new OdbcDataAdapter(DbCommand);DbConnection.Open();
DataSet ds = new DataSet();myDataAdapter.Fill(ds,
"time"); DataTable dt = ds.Tables["time"]; foreach (DataRow row in dt.Rows){
}
CraigPosted May 24, 2008, 11:13 AM
Blocked AccountPosted May 23, 2008, 2:22 AM
U can get the no of rows by using this
dt.Rows.Count