Link to home
Start Free TrialLog in
Avatar of LeTay
LeTay

asked on

How to specify connection timeout to TIBDatabase component

I am looking for a way to specify a connection timeout limit when accessing a IB database with Delphi (TIBDatabase component)
Avatar of Ferruccio Accalai
Ferruccio Accalai
Flag of Italy image

You can set a Connection Timeout parameter into the ibconfig file, but it's global and affects any attached component. So it's not possible to force a custom connection timeout from TIBDatabase
Avatar of LeTay
LeTay

ASKER

But I assume that when the client (Delphi application) tries to connect, it uses some timeout and if no server answer, then exception occurs ? Is that value hardcoded ?
Where should the ibconfig file be located ?
Do you have some example ?
Avatar of LeTay

ASKER

As I can read in the Firebird documentation, ibconfig is for the server
But what for the client
When is issue this IB.Connected := True, if the server is not available, I get an exception after "some time" : how can i fix this "some time" ?
Thanks
ASKER CERTIFIED SOLUTION
Avatar of Geert G
Geert G
Flag of Belgium image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of LeTay

ASKER

Currently, I measured that the timeout (that I want to modify) is 40 seconds !
Surely there is something configurable there ... but where ?
Avatar of LeTay

ASKER

Hello Geert,
I am not familiar at all with semaphores etc..
Do you have a sample of code piece that would do what I need ?

I have found (in IBDatabase.pas) that the exception comes out from the DLL (gds I presume) call. I wonder if it is possible to have a config file for that one, ibconfig may be ?