Hi. Im having this function to determine weather a user exists in a database or not
DM is my DataModule
AQ_LOGIN an ADOQuery
BENU is my Table filled with Users and their Password
Here comes the code:
function UserCheckExist(Login, pw: string): boolean;
begin
with DM do
begin
AQ_LOGIN.Close;
AQ_LOGIN.SQL.Clear;
AQ_LOGIN.SQL.Add('select BLOGIN from BENU where BLOGIN = ''Login'' AND BPW = ''pw''');
AQ_LOGIN.Open;
end;
end;
My question now is: How can I make the function return true or false weather the User with the according password exists?
Thanks in advance.