You need to fill a DataSet from the result that is returned by the stored procedure. The first result
set must be added to a DataTable named Class, and the second result set must be added to a
DataTable named Student. Which code segment should you use?
A.
DataSet ds = new DataSet ();
SqlDataAdapter ad = new SqlDataAdapter
(“GetClassAndStudents”, conn); ad.Fill(ds) ;
B.
DataSet ds = new DataSet();
SqlDataAdapter ad = new SqlDataAdapter
(“GetClassAndStudents”, conn); ds.Tables.Add(“Class”) ;
ds.Tables.Add(“Student”) ;
ad.Fill(ds) ;
C.
DataSet ds = new DataSet ();
SqlDataAdapter ad = new SqlDataAdapter
(“GetClassAndStudents”, conn);
ad.MissingMappingAction = MissingMappingAction.Ignore;
ad.Fill(ds, “Class”);
ad.Fill(ds, “Student”);
D.
DataSet ds = new DataSet ();
SqlDataAdapter ad = new SqlDataAdapter
(“GetClassAndStudents”, conn);
ad.TableMappings.Add(“Table”, “Class”);
ad.TableMappings.Add(“Tablel”, “Student”);
ad.Fill(ds) ;
Explanation:
http://msdn.microsoft.com/en-us/library/ms810286.aspx