请问ASP.NET 怎么读取数据库中字段
private void Button1_Click(object sender, System.EventArgs e)
{
try
{
OleDbConnection con = new OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source= "+Server.MapPath("admin.mdb"));
con.Open();
OleDbCommand com = new OleDbCommand("select * from admin where user='"+TextBox1.Text+"'and paw='"+TextBox2.Text+"'",con);
if(com.ExecuteScalar()!=null)
{
Session["kk"]=this.TextBox1.Text.ToString();
con.Close();
Response.Redirect("admin.aspx");
}
else
{
Response.Redirect("weblogin.aspx");
}
}
catch (Exception ee)
{
Response.Write(ee.Message.ToString());
}
}
请问以上语句如果想加多一个Session["Popedom"],(Popedom 在数据库已经有这个字段了)