procedure TForm1.Button1Click(Sender: TObject); var name,pasword, privilege:string; UserId: Integer; begin IBQuery1.SQL.clear; IBQuery1.SQL.add('Select * from USER_ACCESS where USERID = '+ edit1.Text+'') ; IBQuery1.Active := true; UserId := IBQuery1.FieldByname('USERID').AsInteger; pasword:= IBQuery1.Fieldbyname('PASWORD').AsString; name := IBQuery1.fieldbyname('NAME').AsString; privilege := IBQuery1.fieldbyname('USERTYPE').AsString; if((UserId = StrToInt(edit1.Text)) And (pasword = edit2.Text)) THEN begin ShowMessage('login Successful ' + name); Form2.Show; Form1.Hide; end else ShowMessage('Wrong Password'); end;
TForm1
Form1
TForm2
Form2
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)