I have an application built in Delphi and it accesses MySQL database using MyDAC componentsand Windows XP O.S. .
I want this application to run on System Startup,so I added the Application shortcut to the Startup folder also added a Registry key .
But when I start my system ,first an Microsoft error message pops up
Myapplication.exe has encountered a problem and needs to close.
and asks for error reporting.
After this another error from the application comes up
Exception EMyError in module MyApplication.exe
Can't connect to MySQL server on 'localhost'(10061)
Socket error on connect.
how do I overcome this?
any help appreciated
Some hints:
EMyErrorexception – in this case, useSleep(5000)to wait for 5 seconds, then retry until the connection will take place.A typical code, using a service, may be: