what im doing wrong? _utf8 :parameter
Posted: Mon 13 Jul 2009 18:56
Hello, im having some trouble with a case insensitive login...
look the SQL query code:
select * from s_users where user = _utf8 :user and pass = :pass
Example:
user: Admin
pass: root
in the sql manager i put this code:
select * from s_users where user = _utf8 'ADMIN' and pass = 'root'
Works fine, the user 'Admin' is found
but in runtime with parameters does not work,
qLOGIN.parambyname('user').Value := edtLogin.text;
qLOGIN.parambyname('pass').Value := edtPass.text;
qLOGIN.Open;
just returns a empty dataset... only works if i use a case sensitive user name, like 'Admin' not 'ADMIN' or 'admin'
what is the problem?
Thanks,
look the SQL query code:
select * from s_users where user = _utf8 :user and pass = :pass
Example:
user: Admin
pass: root
in the sql manager i put this code:
select * from s_users where user = _utf8 'ADMIN' and pass = 'root'
Works fine, the user 'Admin' is found
but in runtime with parameters does not work,
qLOGIN.parambyname('user').Value := edtLogin.text;
qLOGIN.parambyname('pass').Value := edtPass.text;
qLOGIN.Open;
just returns a empty dataset... only works if i use a case sensitive user name, like 'Admin' not 'ADMIN' or 'admin'
what is the problem?
Thanks,