请问为什么我到ExecSQL就出错,错在哪里求高手解答
with DataModule1.ADOQuery2 dobegin
close;
sql.Clear;
sql.Add('select * from operator where user=:user');
parameters.ParamByName('user').Value :=edit1.text;
open;
if (FieldValues['password']=edit1.Text) and (FieldValues['user']=username) then
begin
if edit2.Text=edit3.Text then
begin
close;
sql.Clear;
sql.text:='update operator set password=:u '+'where password='''+edit1.text+'''';
parameters.ParamByName('u').Value :=edit2.text;
ExecSQL;
showmessage('密码修改成功');
end
else
showmessage('新密码不相等');
end
else
showmessage('原密码错误');
end;