MyDAC Can't connect error loop in XE IDE

Discussion of open issues, suggestions and bugs regarding MyDAC (Data Access Components for MySQL) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
skydvrz
Posts: 32
Joined: Tue 23 Feb 2010 23:49
Location: Kissimmee, Florida USA
Contact:

MyDAC Can't connect error loop in XE IDE

Post by skydvrz » Thu 30 Dec 2010 18:27

I develop software both inside and outside my corporate LAN. The MySQL server hostname I use is different for internal and external users.

My problem is that if my datamodule DFMs refer to the wrong hostname and I open one in the IDE, I get dozens of these error message dialogs:

Code: Select all

Can't connect to MySQL server on 'serverxyz' (10061)
Socket error on connect. WSAGetLastError return 11004($2AFC)
This pops up because the hostname does not exist on this side (inside/outside) of the corporate firewall.

I get so many error dialogs, that I have to kill the IDE process, edit my DFMs with Notepad to modify the hostname and then retry the IDE.

I suspect I am getting a lot of errors due to the retry mechanism in MyDac or from each MyQuery - I am not sure.

This is a royal pain! After I make the mod and check it into the version control system, it will blow up the next time I edit on the other side of the firewall!

Is there some way to kill the error loop after a couple errors, add support for multiple hostnames, or add a "Ignore future similar errors in this session" checkbox to the error dialog? Maybe MyConnecton needs a NoDesignRetry property?

Everything works fine in the actual EXE - it is the IDE that is the problem. At runtime, my code can detect the current workstation IP and deduce the correct hostname. The retry feature works flawlessly at runtime (Many thanks for that wonderful feature!)

I am using Rad Studio XE and Win7-64.

AndreyZ

Post by AndreyZ » Tue 04 Jan 2011 10:06

Hello,

It seems that you are using many TMyConnection components, and each of them is trying to connect when you open your application. To avoid these errors you shouldn't set the TMyConnection.Connected property to True in design time.

Post Reply