在不能更新数据库的内容啊,帮忙看看.谢谢
我先把数据库的内容显示出来,然后再更改,可为什么改了后数据库的内容不变啊,
程序是
void Page_Load(Object sender, EventArgs e)
{
OleDbConnection condatabase;
OleDbCommand cmddatabase;
OleDbDataReader dtrdatabase;
string strname;
string strSelect;
strname = Request.QueryString[ "name1 "];
// Retrieve records from database
condatabase = new OleDbConnection( "PROVIDER=Microsoft.Jet.OLEDB.4.0;DATA Source=E:\\WebSite2\\database.mdb ");
strSelect = "Select * from rigist Where 姓名=@name1 ";
cmddatabase = new OleDbCommand(strSelect, condatabase);
cmddatabase.Parameters.Add( "@name1 ", strname);
condatabase.Open();
dtrdatabase = cmddatabase.ExecuteReader(CommandBehavior.SingleRow);
if (dtrdatabase.Read())
{
TextBox1.Text = dtrdatabase[ "姓名 "].ToString();
TextBox2.Text = dtrdatabase[ "住宅电话 "].ToString();
TextBox3.Text = dtrdatabase[ "职务 "].ToString();
TextBox4.Text = dtrdatabase[ "邮政编码 "].ToString();
TextBox5.Text = dtrdatabase[ "密码 "].ToString();
TextBox6.Text = dtrdatabase[ "简介 "].ToString();
}
&n