im trying to create a login system using delphi 7, i want a username and password system that checks an Access database ive got the database setup and done alot of the coding but it doesnt work.
The Table is 'Login' and the fields are 'Username' and 'password'.
can anyone show me an example code for this type of system?
my coding.
can anybody help me here or show an example of a working code?
:?:
thanks, Jiro
The Table is 'Login' and the fields are 'Username' and 'password'.
can anyone show me an example code for this type of system?
my coding.
Code:
Procedure TfrmLogin.BtnLoginClick(Sender: TObject);
begin
try
ADOQuery1.Close;
ADOQuery1.SQL.CLEAR;
ADOQuery1.SQL.ADD('SELECT Username, Password FROM Login');
ADOQuery1.SQL.ADD('WHERE Username = (:Username)');
ADOQuery1.SQL.ADD('AND Password = (:password)');
ADOQuery1.Parameters[0].Value := Edit1.Text;
ADOQuery1.Parameters[1].Value := Edit2.text;
ADOQuery1.Open;
:?:
thanks, Jiro