On 20/11/2012 15:41, Reinier Olislagers wrote:
On 20-11-2012 13:47, Eric Kom wrote:
the last usernameLogin field in the table as erickom and the first 2 ajm
and ajm1.
on the authentication form, when I entered erickom and its password,
everything goes well, when I entered an unknown username everything goes
well as well like 'Failed to connect using: ' + getUsername; but when I
entered the 2 first usernames that are in the table (ajm & ajm1) its not
responding as expected, the if condition jump after display the message
Retrieving information for: ' + retUsername to Failed to connect using:
' + getUsername. Abnormal behave.
Please view below my code and Thank in advance:
if MySQL55.Connected=True then begin;
//SQLQueryMySQL.SQL.Text := 'SELECT usernameLogin,
passwordLogin, fullNameLogin FROM scholarly.login WHERE usernameLogin =
'':getUsername'' AND passwordLogin = '':getPasswordHash''';
Apart from Luk's remarks,
I wouldn't use quotes around those parameters in the WHERE clause. The
parameters are meant to work around the quote problems.
I'd focus on getting the code above fixed as it's much more elegant: it
let's the DB engine focus on the query...
I was trying to affect the variable value to a field. I did confuse them
with the single quote whether they are 1, 2 or 3
Groete,
Reinier
--
_______________________________________________
Lazarus mailing list
[email protected]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
--
Kind Regards
Eric Kom
System Administrator - Metropolitan College
_________________________________________
/ You are scrupulously honest, frank, and \
| straightforward. Therefore you have few |
\ friends. /
-----------------------------------------
\
\
.--.
|o_o |
|:_/ |
// \ \
(| Kom | )
/'\_ _/`\
\___)=(___/
2 Hennie Van Till, White River, 1240
Tel: 013 750 2255 | Fax: 013 750 0105 | Cell: 078 879 1334
[email protected] | [email protected]
www.kom.za.net | www.kom.za.org | www.erickom.co.za
Key fingerprint: 513E E91A C243 3020 8735 09BB 2DBC 5AD7 A9DA 1EF5
--
_______________________________________________
Lazarus mailing list
[email protected]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus