Hi ,I am working with C#.net,I am using cursor concept in my storedprocedure,While executing it in Sqlserver it is showing Multiple tables,but it is not returning multiple Tables in the code,it is returning only the first table,The following is the code which i have used:
DataSet ds = new DataSet("table1");
using (SqlConnection connection = new SqlConnection(connectionstring))
{
using (SqlDataAdapter da = new SqlDataAdapter("getworkpersondetails_Orderidwise", connection))
{
da.SelectCommand.CommandType = CommandType.StoredProcedure;
SqlParameter param;
param = new SqlParameter("@OrderId", SqlDbType.Int);
param.Value = OrderId;
da.SelectCommand.Parameters.Add(param);
param = new SqlParameter("@CompanyId", SqlDbType.Int);
param.Value = CompanyId;
da.SelectCommand.Parameters.Add(param);
connection.Open();
da.Fill(ds);
connection.Close();
return ds;
}
}