string s=dr["pass"].tostring()为什么取数 提示空呢
strsql = "select uname,upass from user1 where uname='"+uname+"'";
SqlCommand comm1 = new SqlCommand(strsql, conn);
comm1.Connection .Open ();
SqlDataReader dr = comm1.ExecuteReader();
dr.Read();
pwd = dr["upass"].ToString();
dg.DataSource = dr;
dg.DataBind();
为什么会提示 尝试没有数据的读取呢?