I'm using MySQL acces components in direct mode, so I don't know how has 'MyEmbConnection' appeared in clausule 'uses' of my Datamodule file.
Well, there is no problem unless you try to run this application on a computer where MySQL is not installed, then program fails and you get this error message: "Can't connect to MySQL server on 'localhost' (10061) Socket error on connect. WSAGetLastError return 10061($274D)" and program brokes.
I've solved this problem simple by deleting 'MyEmbConnection' in 'uses' but I'd like notify it to you for it seems a bit extrange, even when TMyConnection.Server is blank, TMyConnection.Option.Direct=True and TMyConnection.Options.Embedded=False, and it isn't trying to connect to a server yet.
Thanks.
Problem with MyEmbConnection
-
AndreyZ
The MyEmbConnection unit is added automatically to the USES clause only if there is the TMyEmbConnection component on the form. The MyEmbConnection component doesn't influence on work of the TMyConnection component. The "Can't connect to MySQL server on 'localhost'" error means that you are trying to connect to a local MySQL server that doesn't exist. If you leave the TMyConnection.Server property blank, TMyConnection uses the localhost as a server to connect to. To solve the problem, you should set TMyConnection.Server to a valid server name or IP address.
-
AndreyZ