[求助]DataReader的NextResult()运行出错
string strConn = "server=(local);uid=sa;pwd=;database=student2";
myConn = new SqlConnection(strConn);
myConn.Open();
string s1 = "select Name from Score";
string s2 = "select Chinese from Score";
SqlCommand myComm = new SqlCommand(s1+s2,myConn);
SqlDataReader dr = myComm.ExecuteReader();
do
{
while(dr.Read())
{
Message.Text = Message.Text +"/"+dr[0].ToString();
}
Message.Text = Message.Text + "***";
}while(dr.NextResult());
dr.Close();
myConn.Close();
在运行到SqlDataReader dr = myComm.ExecuteReader();时出错,为什么?初学,望赐教!