关于数据读取问题
我的代码是:
string pConnectionString="";
pConnectionString="server=(local);database=AppDta;uid=b;pwd=a;";
SqlConnection MyConn=new SqlConnection(pConnectionString);
string strSel1="";
string strSel2="";
strSel1="select company,money from bb order by company";
strSel2="select company,sum(money) as 'a' from bb group by company ";
SqlCommand MyComm1=new SqlCommand(strSel1,MyConn);
MyComm1.Connection.Open();
dr1=MyComm1.ExecuteReader();
SqlCommand MyComm2=new SqlCommand(strSel2,MyConn);
dr2=MyComm2.ExecuteReader();
出现下面错误:
已有打开的与此连接相关联的 DataReader,必须首先将它关闭。
请问怎样读取这个查询.