Assertion failure (d:\Projects\Delphi\Mydac\Source\MySqlApi.pas, line 2746)
Posted: Mon 17 Apr 2006 00:22
Since moving from Delphi 7 to Delphi 2005 I'm getting this error. I have Update 3 installed for Delphi 2005 and MyDAC version 4.30.0.11.
I'm using mysql embedded with the following code:
Also, it doesn't happen all the time. If I get the error, I can generally close the program and restart it and everything will work. Any thoughts on how to fix this would be helpful.
Thanks,
Jesse
I'm using mysql embedded with the following code:
Code: Select all
procedure TfrmLogin.btnLoginClick(Sender: TObject);
begin
try
localConnection.Connect;
finally
localQuery.SQL.Text := 'SELECT * FROM users WHERE username = ' + QuotedStr(editUsername.Text) + ' AND password = OLD_PASSWORD(' + QuotedStr(editPassword.Text) + ') AND active = 1';
localQuery.Open;
if (localQuery.RecordCount = 1) then
begin
end;
else
begin
editUsername.SetFocus;
showmessage('Please check your username and password again.');
end;
localQuery.Close;
localConnection.Connected := False;
end;
end;Thanks,
Jesse