Subject Re: [IBO] Need to Unprepare (was Re: IBO application blinks out after 10-15 days)
If you are done with the query, yes, it is good to unprepare it. If you unprepare it, the dataset is closed automatically as a
part of unpreparing. It is possible to call FreeServerResources which will leave the dataset's buffers open but the
statement handle will be deallocated.

Freeing forms that own queries is perfectly fine. IBO automatically takes care of freeing all resources it makes use of in its

Jason Wharton

So, when I'm done with a TI_Query, I should always Unprepare it. Closing it
is not required.

In many places of my projects I close queries and then free them (via freeing
the forms that own them). Am I leaving server memory tied up?

Sorry if I seem thick; this was a surprise.

On Friday 12 March 2004 3:03 pm, jwharton@... wrote:
> You can close queries without doing an unprepare. If you Unprepare a query
> it is also closed. Thus, you can think of Unprepare as a closing of the
> query, a release of all buffers and a release of the statement handle to
> the server.
> Jason Wharton
> ---------------------------------------------------------------------------
> ---------------------------------------------------------------------------
> On Thursday 11 March 2004 4:38 pm, jwharton@... wrote:
> > to remain prepared. Just keep in mind if you keep a statement prepared
> > there are various client memory structures (blobs and record buffers)
> > that will not be freed (even if a query is closed). By doing a periodic
> > unprepare of your statements and datasets will keep your client memory
> > from being used up.
> Does this mean that for any and all applications I need to unprepare
> queries before I close them? Does this (blob and record buffer) memory
> every get freed automatically, for example when I close / destroy the
> connection?
> Thanks,
> Tim