While using Normal 0 false false false EN-US X-NONE X-NONE MicrosoftInternetExplorer4 SqlDataAdapter, we can fill dataset with the Fill() method passing dataset object which contains tables collection as multiple result according to the CommandText.
We can retrieve/traverse among the result set using Normal 0 false false false EN-US X-NONE X-NONE MicrosoftInternetExplorer4 SqlDataReader as bellow:
Normal 0 false false false EN-US X-NONE X-NONE MicrosoftInternetExplorer4
using (SqlConnection objConnection = new SqlConnection(ConnectionString))
{
objConnection.Open();
using (SqlCommand sqlCmd = new SqlCommand("sp_Custom_GetMultipleResultSet", objConnection))
SqlDataReader objFirstResultSet = sqlCmd.ExecuteReader();
if (objFirstResultSet.NextResult())
// Other operation code block here
}
Md. Elias HossainMCP, MCTS(WEB) Software Engineer
"sp_Custom_GetMultipleResultSet" is this a store procedure name?
"Excuse if any gaffe."Md Nazmul AhsanProgrammer (.NET Framework)CIS, IADCS & DIT
Yes, "sp_Custom_GetMultipleResultSet" is a stored procedure which contain multiple select statement.
Thanks