Update语法会有错吗???
void btnok_Click(Object Sender,System.EventArgs e)
{
OleDbConnection thisConnection=new OleDbConnection(@"Provider=Microsoft.Jet.OLEDB.4.0;Data Source="+Server.MapPath("../../dbs/webdata.mdb")+"");
thisConnection.Open();
OleDbCommand thisCMD=thisConnection.CreateCommand();
thisCMD.CommandText="Select password from logings where password='"+this.oldpsw.Text+"'";
OleDbDataReader thisReader=thisCMD.ExecuteReader();
if(thisReader.Read())
{
int b=1;
thisReader.Close();
thisCMD.CommandText="Update logings set password='"+this.newpsw.Text+"' where id="+b+"";
thisCMD.ExecuteNonQuery();
}
else
{lb4.Visible=true;}
thisConnection.Close();
}