C
Chris Taylor
Hi,
You can enumerate the rows in the DataTable that is returned in the DataSet
ds=ser.getAllCarTypes();
foreach( DataRow dr in ds.Tables[0].Rows )
{
if ( !dr.IsNull(0) ) // Check that the column is not null
cmbType.Items.Add( dr[0] );
}
The above example uses 0 for the table and 0 for the column, this is based
on the sample you provided. In both cases you could also use the string name
for each as in ds.Tables["Table1"].Rows and dr["description"].
Hope this helps
Chris Taylor
You can enumerate the rows in the DataTable that is returned in the DataSet
ds=ser.getAllCarTypes();
foreach( DataRow dr in ds.Tables[0].Rows )
{
if ( !dr.IsNull(0) ) // Check that the column is not null
cmbType.Items.Add( dr[0] );
}
The above example uses 0 for the table and 0 for the column, this is based
on the sample you provided. In both cases you could also use the string name
for each as in ds.Tables["Table1"].Rows and dr["description"].
Hope this helps
Chris Taylor