请问asp中读取数据用的rs("字段名"),在asp.net中怎么表示?
请问asp中读取数据用的rs("字段名")在asp.net中怎么表示?
conn.open();
StrSql="select * from cpjs where id="+Request.QueryString["id"];
OleDbCommand mycommand=new OleDbCommand(StrSql,conn.dbconn);
OleDbDataReader myReader=mycommand.ExecuteReader();
if(myReader.Read())
{
this.fzmz1.Text=myReader["fzmz"];
~~~~~~~~~~~~~~
}
else
{
Response.Write ("<script>alert('当前没有记录,请返回!!');history.go(-1);</script>");
}