MySQL Forums
Forum List  »  Delphi

Timeout problems
Posted by: Euthymos Rossi
Date: November 22, 2006 08:31AM

Dear developers,

I'm developing a simple DB Client application. This application establishes a connection to a remote DB with a TADOConnection component.

But, sometimes, the remote server is down, so that my application freezes for 30 seconds before raising an exception.

That's a very bad behavior. Is there a way to "cancel" the connection attempt. I tried making the connection asynchronous and stopping it with Cancel method, but doing this way the connection is always "apparently successful" even if it is not.

I can't understand how can I make my program wait for that connection to be established while permitting the user to STOP this connection attempt. What is the most efficient way? Are there any components which help me to connect to a MySQL server in a more safe way (i.e. providing a "Cancel" button)?

Thank you in advance.

Edited 1 time(s). Last edit at 11/22/2006 08:32AM by Euthymos Rossi.

Options: ReplyQuote

Written By
Timeout problems
November 22, 2006 08:31AM
November 23, 2006 04:57AM

Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.