1

ExecuteQuery()の別の結果セットからデータを読み取り中にしたいExecuteQuery

SqlCommand cmd1 = new SqlCommand("pgwp_teamtypeselect", con);
cmd1.CommandType = CommandType.StoredProcedure;

rdr = cmd1.ExecuteReader();

string ehtml = null;
string tipi = null;
int che = 0;

while (rdr.Read())
{
    SqlCommand cmd2 = new SqlCommand("pgwp_goalselect", con);
    cmd2.CommandType = CommandType.StoredProcedure;

    rdr2 = cmd2.ExecuteReader();

    while (rdr2.Read())
    {
        do something.....
    }
}
4

1 に答える 1