Subject Re: [IBO] catching excpetion in TIB_Connection.Connect
Author Helen Borrie
At 05:41 AM 23-09-02 +0000, you wrote:
> >
> > OnLoginFailure ?
>No, as this is only called once ALL login attempts have been made.
>I need to be able to catch the exception on the first failure, to
>determine if it is from not finding the gdb file.

What about using the BeforeConnect event to pre-empt a failure?

There's an example in the Contact sample app. Here's the handler:

procedure TdmContact.cnContactBeforeConnect(Sender: TIB_Connection);
// Dynamically create the sample GDB if it does not exist.
if ( cnContact.Protocol = cpLocal ) and
not FileExists( cnContact.Database ) then