Subject | What to do when cn->Connect() fails |
---|---|
Author | tickerboo2002 |
Post date | 2004-12-17T15:44:56Z |
How do I handle a failed connection gracefully?
Within my datamodule, if I set the server to be 1.1.1.1 (i.e. where I
know it will fail), cn->Connect() throws a 335544721 ISC exception after
around 40s.
If I then try to exit the application, either by PostQuitMessage or
throwing an exception to WinMain exception handler, the application
still appears to be running. Is it still trying to connect to
Firebird somehow?
Also, is there a way to reduce the time it spends trying to connect to
the server before it gives up? I've changed the client firebird.conf
ConnectionTimeout to 8s instead of 180s, but this doesn't appear have
made any difference.
Using BCBv5, FBv1.5, IBO v4.3Aa
Within my datamodule, if I set the server to be 1.1.1.1 (i.e. where I
know it will fail), cn->Connect() throws a 335544721 ISC exception after
around 40s.
If I then try to exit the application, either by PostQuitMessage or
throwing an exception to WinMain exception handler, the application
still appears to be running. Is it still trying to connect to
Firebird somehow?
Also, is there a way to reduce the time it spends trying to connect to
the server before it gives up? I've changed the client firebird.conf
ConnectionTimeout to 8s instead of 180s, but this doesn't appear have
made any difference.
Using BCBv5, FBv1.5, IBO v4.3Aa