Abort ExecSQL
Abort ExecSQL
Hello,
i have a question about the TIBCQuery.
It's possible to abort the ExecSQL if the Firebird Server host is not reachable?
We have the big Problem, that we must work with a remote Database in a very unstable Network over WLAN.
We need something like a ConnectionTimeout which aborts the Execution (f.e. after 5 seconds) and the GUI don't freeze for about 30 seconds.
Thanks in advance
Manuel
i have a question about the TIBCQuery.
It's possible to abort the ExecSQL if the Firebird Server host is not reachable?
We have the big Problem, that we must work with a remote Database in a very unstable Network over WLAN.
We need something like a ConnectionTimeout which aborts the Execution (f.e. after 5 seconds) and the GUI don't freeze for about 30 seconds.
Thanks in advance
Manuel
-
AndreyZ
Hello,
If the Firebird server cannot be reached, any query execution attempt will result in an exception, and no execution will be performed on the server. If server is available, you can break execution by calling the TIBCQuery.BreakExec method. You should call this method from another thread. For more information, please read the IBDAC documentation.
If the Firebird server cannot be reached, any query execution attempt will result in an exception, and no execution will be performed on the server. If server is available, you can break execution by calling the TIBCQuery.BreakExec method. You should call this method from another thread. For more information, please read the IBDAC documentation.
-
AndreyZ
-
tsteinmaurer
- Posts: 52
- Joined: Thu 17 Dec 2009 08:25
Yes, we call the "ExecSQL" or "Execute" method in a separate thread to prevent the freeze of the main thread. The main thread so don't freeze but the thread waits about 30 seconds until the exception is fired.
In this time we can not Execute other statements over this thread.
A possible solution is to create more threads, but we search a better solution...
Is there something like the "CONNECT TIMEOUT" in the standart Delphi TDatabase component?
In this time we can not Execute other statements over this thread.
A possible solution is to create more threads, but we search a better solution...
Is there something like the "CONNECT TIMEOUT" in the standart Delphi TDatabase component?
-
AndreyZ
If i create a new empty Delphi Application, place a IBCConnection, IBCTransaction and a IBCQuery on the Form and then execute a long statement on a Firebird 2.5 Server it takes on connection lost about 30 seconds until i receive the "error reading data from the connection" Exception.
What is going wrong?
Used components:
Delphi 2009
Firebird 2.5
IBDac 3.60
What is going wrong?
Used components:
Delphi 2009
Firebird 2.5
IBDac 3.60
-
AndreyZ
Hello,
Please try connecting to your server with telnet in the following way:This way you can check the speed of your network.
We cannot influence such behaviour of Firebird server. We use the standard Firebird library fbclient.dll to connect to the server. You can try using other versions of this library.
If the problem persists, please write about it to the Firebird support.
Please try connecting to your server with telnet in the following way:
Code: Select all
telnet server 3050We cannot influence such behaviour of Firebird server. We use the standard Firebird library fbclient.dll to connect to the server. You can try using other versions of this library.
If the problem persists, please write about it to the Firebird support.