Connection los (MySQL 5.0.27 / MyDAC 4.40.0.21

Discussion of open issues, suggestions and bugs regarding MyDAC (Data Access Components for MySQL) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
Hans
Posts: 52
Joined: Wed 24 Aug 2005 20:05

Connection los (MySQL 5.0.27 / MyDAC 4.40.0.21

Post by Hans » Wed 17 Jan 2007 22:04

Hi,

I created an application using Delphi7 and the MyDAC components. Now it seems that sometimes (a couple of times a week) i get a connection error:

- Error Class: EMyError
- Error Message:Lost connection to MySQL server during query Socket error on write. WSAGetLastError return 10053($2745)

I would very uch appreciate an an example how to handle this, since no it generates a windows error?

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

Post by Antaeus » Thu 18 Jan 2007 07:22

To handle such errors you should place corresponding code to the OnError event handler of your TMyConnection object. To prevent showing error message box by MyDAC, you should change value of the Fail parameter to False in this event handler.

Post Reply