Time:09-24
CodePudding user response:
water, so you know in your family?
procedure TForm1. Button1Click (Sender: TObject); The begin ADOQuery1. Close; ADOQuery1. SQL. The Clear; ADOQuery1. SQL. The Add (' Select * from the User Where the UserName=: UserName AND PassWord="PassWord"); ADOQuery1. The Parameters. The Items [0]. Value:=Edit1. Text; ADOQuery1. The Parameters. The Items [1]. The Value:=Edit2. Text; ADOQuery1. Open; If ADOQuery1. RecordCount & gt; 0 then the begin ADOQuery1. FieldByName (" PassWord "). AsString:=Edit3. Text; Showmessage (' password is changed! '); End the else begin Showmessage (' user name or password mistake, please confirm and re-enter! '); end; end;
building code there is a big loophole!
ADOQuery1. Edit; ADOQuery1. FieldByName (" PassWord "). AsString:=Edit3. Text; ADOQuery1. Post;
Quote: refer to the sixth floor liups response: Building code there is a big loophole! 4th floor! If the query has multiple records?
Building code there is a big loophole!
Page link:https//www.codepudding.com/Backend/26701.html