if (dr.Read())
{
SqlDataAdapter sda = new SqlDataAdapter(str, mycon);
DataSet ds = new DataSet();
sda.Fill(ds, "mytb");
DataView dv = ds.Tables["mytb"].DefaultView;
GridView1.DataSource = dv;
GridView1.DataBind();
dr.Close();
}你想做什么操作?dr.Read()你打开的是select * from dingdan where ID = '" + Session ["danhao"] + "'";你又在Read()里面操作select * from dingdan where ID = '" + Session ["danhao"] + "'";这是不允许的
{
SqlDataAdapter sda = new SqlDataAdapter(str, mycon);
DataSet ds = new DataSet();
sda.Fill(ds, "mytb");
DataView dv = ds.Tables["mytb"].DefaultView;
GridView1.DataSource = dv;
GridView1.DataBind();
dr.Close();
}你想做什么操作?dr.Read()你打开的是select * from dingdan where ID = '" + Session ["danhao"] + "'";你又在Read()里面操作select * from dingdan where ID = '" + Session ["danhao"] + "'";这是不允许的
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货