I'm able to get one recordset from my SP that has two select statements. How
do I get the second recordset? How do I access the second recordset to
populate the tag of my controls?
Here is my code so far. I'm getting an error 'System.Data.DataTable' does
not contain a definition for 'Col' on ds.Tables[1].Col = 0;
string sConnString =
System.Configuration.ConfigurationSettings.AppSett ings["dsn"];
string sProc = "prGet_HIP";
using (SqlConnection oCn = new SqlConnection(sConnString))
{
using (SqlCommand oCmd = new SqlCommand(sProc, oCn))
{
oCn.Open();
oCmd.CommandType = CommandType.StoredProcedure;
oCmd.Parameters.Add("@sLicenseYear", SqlDbType.SmallInt,
2);
oCmd.Parameters["@sLicenseYear"].Value = intLicYear;
SqlDataAdapter oDa = new SqlDataAdapter();
oDa.SelectCommand = oCmd;
DataSet ds = new DataSet();
oDa.Fill(ds);
cboRails.DataSource = ds.Tables[0];
ds.Tables[1].Col = 0;
ds.Tables[1].Row = 0;
chkRailsNo.Tag = ds.Tables[1];
chkRailYes.Tag = ds.Tables[1];
cboWoodcook.DataSource = ds.Tables[0];
ds.Tables[1].Col = 0;
ds.Tables[1].Row = 1;
chkWoodcockYes.Tag = ds.Tables[1];
chkWoodcockNo.Tag = ds.Tables[1];
}
}