Question about EMyError

Discussion of open issues, suggestions and bugs regarding MyDAC (Data Access Components for MySQL) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
flashLAV
Posts: 4
Joined: Mon 25 Jun 2007 08:47
Location: Russia

Question about EMyError

Post by flashLAV » Mon 25 Jun 2007 09:04

Hi...
I try to create processing of various exception through EMyError but sometimes EMyError.Message gives not formatted line...
Example (with TMyConnection):

- try connect with wrong login/pass:
#28000Access denied for user ......

- try connect with wrong database name
#42000Unknown database .....

What is digits before text string?

Antaeus
Posts: 2098
Joined: Tue 14 Feb 2006 10:14

Post by Antaeus » Tue 26 Jun 2007 15:08

This message is sent by MySQL server. Digits before text are the MySQL server error number.

flashLAV
Posts: 4
Joined: Mon 25 Jun 2007 08:47
Location: Russia

Post by flashLAV » Wed 27 Jun 2007 07:00

Well, I understood...
In other words, if I receive message (example, '"#28000Access denied for user ... ', where no blank between numbers and string), this message is direct from a server.
If I need more legible messages, I can take E.ErrorCode for for these purposes

Thanks

Post Reply