Why are error messages prefixed?

Discussion of open issues, suggestions and bugs regarding MyDAC (Data Access Components for MySQL) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
snorkel
Posts: 384
Joined: Tue 08 Aug 2006 15:10
Location: Milwaukee WI USA

Why are error messages prefixed?

Post by snorkel » Mon 14 Aug 2006 21:19

When I get a error message back it looks like this:


#42S02Table 'mysq.user' doesn't exist

why is this prefix on the message and how can I get rid of it?

Thanks,

Snorkel

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

Post by Antaeus » Wed 16 Aug 2006 10:53

This error message is retrieved from MySQL Server and showed without changes. You can catch this exception, using try ... except statement, change error message and raise the error with changed error message.

ben
Posts: 119
Joined: Wed 17 Nov 2004 19:48

Post by ben » Tue 22 Aug 2006 21:36

or you can use string functions to remove # and numbers from the message. very easy...

Post Reply