SqlDataReader sdr = cmd.ExecuteReader();??????异常
在如下程序中conn.Open();cmd=newSqlCommand("selecttop"+xzflag+"*fromtb_TestwhereTypeID=1orde...
在如下程序中
conn.Open();
cmd = new SqlCommand("select top" + xzflag + "* from tb_Test where TypeID=1 order by newid()",conn);
//SqlDataReader sdr = cmd.ExecuteReader();??????
MessageBox.Show("123");
// while (sdr.Read())
// {
我用message,Box()判断何处出错时,发现只有SqlDataReader sdr = cmd.ExecuteReader();??????被注释掉时窗口才可以正常弹出,请问这句哪错了啊???急~!! 展开
conn.Open();
cmd = new SqlCommand("select top" + xzflag + "* from tb_Test where TypeID=1 order by newid()",conn);
//SqlDataReader sdr = cmd.ExecuteReader();??????
MessageBox.Show("123");
// while (sdr.Read())
// {
我用message,Box()判断何处出错时,发现只有SqlDataReader sdr = cmd.ExecuteReader();??????被注释掉时窗口才可以正常弹出,请问这句哪错了啊???急~!! 展开
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询