I'm new to these components so I apologize, but I need help handling a wrong password exception from the MyConnection and MyConnectDialogue. With correct username and password, the applicatio nruns fine, however, an invalid password gives te following error:
"Project myproject.exe raised exception class EMySqlException with
message #280000Access denied for user 'User1@localhost' using
password:YES'. Process stopped. Use Step or Run to continue"
It's probably a quick fix, that I can't see, but any help is appreciated.
Invalid password exception handling (EMysqlException error)
-
- Posts: 2
- Joined: Tue 28 Feb 2006 18:05
-
- Posts: 387
- Joined: Fri 18 Nov 2005 00:26
- Location: Brazil
Re: Invalid password exception handling (EMysqlException error)
What version of myDAC and mySQL server?[email protected] wrote:I'm new to these components so I apologize, but I need help handling a wrong password exception from the MyConnection and MyConnectDialogue. With correct username and password, the applicatio nruns fine, however, an invalid password gives te following error:
"Project myproject.exe raised exception class EMySqlException with
message #280000Access denied for user 'User1@localhost' using
password:YES'. Process stopped. Use Step or Run to continue"
It's probably a quick fix, that I can't see, but any help is appreciated.
the information is very important.
To handle this error try using somethig like this:
Dont forget to include MyClasses and MyCall units into the project.
Code: Select all
try
MyConnection.Connect;
except
on e: EMyError do
if E.Errorcode = ER_ACCESS_DENIED_ERROR then
MessageDlg('Wrong username or password', mtError, [mbOK], 0)
else
raise;
end;
-
- Posts: 2
- Joined: Tue 28 Feb 2006 18:05