-3

i have 5 tables,in every table it has 4 rows. so i need to get all rows and each element in row should be displayed in the table.

But the problem is i wrote all select statements of five tables in one stored proecedures. so how to retrieve them?

Anudeep
  • 21
  • 14
  • this is not a good practice. please make 5 sprocs , so that your code will be maintainable. – Zia Jun 26 '12 at 08:56

1 Answers1

0

You can retrieve them in a Dataset and access each table by dataset.tables["TableName or Index"]

Example:

// SqlCommand cmd=new SqlCommand("ProcedureName","Connection");
// cmd.CommandType = CommandType.StoredProcedure;
// SqlDataAdapter da=new SqlDataAdapter(cmd);
// Dataset ds=new Dataset();
// da.Fill(ds);
// Now after Filling the Dataset you can Retrieve it by

dataset.tables["TableName or Index"]
DaveShaw
  • 52,123
  • 16
  • 112
  • 141