Subject | Re: [IBO] TIB_Events |
---|---|
Author | Helen Borrie |
Post date | 2006-07-25T12:14:15Z |
At 12:37 PM 25/07/2006, you wrote:
If the "error" you are getting is an AV, then here is the cause.
Helen
>HiIt would be a help if you would say what the error is.
>
>I have setup a TIB_Events for each 'Company' managed by our
>application. It is working great, in that it triggers correctly and
>runs just fine. However (most times) when I close the app I get a
>GDS32.dll error. It seems to be triggering when I disconnect from the
>database, although I cannot be 100% sure. Can anybody offer some
>suggestions.
>In the TCompany destructor ...This sets the application's connection to Nil!!!
>
>
> fIb_Events.OnEventAlert := Nil;
>
> if (DataBase.Connected = True) then begin
> if (fIb_Events.Registered = True) then begin
> fIb_Events.UnregisterEvents;
> end;
> end;
>
> fIb_Events.IB_Connection := Nil;
> fIb_Events.Free;You then refer to this nil'ed out connection. Ka-boom!
>
>....
>
> DataBase.Connected := False;
> DataBase.Free;
If the "error" you are getting is an AV, then here is the cause.
Helen