Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6779795
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T16:25:49+00:00 2026-05-26T16:25:49+00:00

I have an application built in Delphi and it accesses MySQL database using MyDAC

  • 0

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

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T16:25:49+00:00Added an answer on May 26, 2026 at 4:25 pm

    Some hints:

    • You should better implements a Windows Service so that the application will start even before the first user log into the system;
    • Services may be started before the network or the DB is ready, so you get this EMyError exception – in this case, use Sleep(5000) to wait for 5 seconds, then retry until the connection will take place.

    A typical code, using a service, may be:

    procedure TMyService.Execute;
    var retry: boolean;
    begin
      retry := true;
      repeat
        try
          ConnectToDatabase;
          retry := false; // connection success
        except
          on E: EMyError do 
            sleep(5000); // wait 5 seconds and retry
        end;
        if Terminated then
          exit; // avoid endless loop
      until not retry;
      // ... now you are connected and you can continue
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a Delphi application which hits a database (usually MySql) every 60 seconds
I have this typical scenario. I have a smartclient application built on .net 2.0
I have a small ajax application built with php. Using phpMyAdmin I have set
I have a Windows Form application built on a data model and a Windows
I have an application built with GWT/Appengine/Jdo...and i am using Google User Service for
I have a DirectShow filter graph in my Delphi 6 application built with the
I have a service application built in Delphi that works great. It does exactly
I have an issue with a report using ReportBuilder 7.X in an application built
We have J2EE application built using Hibernate and struts. We have RMI registry based
I currently have an SDI application that is build with Delphi 7, I want

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.