TMyDmp.RestoreFromFile: hide messagebox on error

Discussion of open issues, suggestions and bugs regarding MyDAC (Data Access Components for MySQL) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
vindac
Posts: 20
Joined: Tue 18 Mar 2014 16:44

TMyDmp.RestoreFromFile: hide messagebox on error

Post by vindac » Mon 22 May 2017 13:54

Hi,
when an error occurs during the TMyDmp.RestoreFromFile , an messagebox is shown. How can I catch this error (in a thread) instead of having this messagebox?

Thanks!

ViktorV
Devart Team
Posts: 3168
Joined: Wed 30 Jul 2014 07:16

Re: TMyDmp.RestoreFromFile: hide messagebox on error

Post by ViktorV » Mon 22 May 2017 14:51

To handle errors during the restore operation, you can use the TMyDump.OnError event handler.
Example: If you want to continue restore execution after error occurrence: to avoid showing error messages, you should set the Action parameter in the TMyDump.OnError event handler to eaContinue if you want to continue script execution.
Note: if you run the application from the IDE, and the Stop On Delphi Exception (Notify on language exceptions) option is enabled, an error message will be shown in any way, independently on the Action parameter value; when running the application from *.exe - an error won't be shown ( Action = eaContinue).
For more information about the TMyDump.OnError event handler, please refer to MyDAC help: https://www.devart.com/mydac/docs/index ... nerror.htm

vindac
Posts: 20
Joined: Tue 18 Mar 2014 16:44

Re: TMyDmp.RestoreFromFile: hide messagebox on error

Post by vindac » Mon 22 May 2017 15:00

Ok, thank you very much!

ViktorV
Devart Team
Posts: 3168
Joined: Wed 30 Jul 2014 07:16

Re: TMyDmp.RestoreFromFile: hide messagebox on error

Post by ViktorV » Tue 23 May 2017 07:55

Thank you for being interested in our products.
Feel free to contact us if you have any further questions about our products.

Post Reply