Subject Re: [IBO] does a tiboquery in a prepared state consume resources on the server?
Author Jason Wharton
I believe it is also possible to have IBO store the params in the DFM.
You may not need to actually prepare the dataset if you do a prepare at
design-time that just may have them in there. Though having them prepared
and then calling Unprepare may also leave the TParams info there as well.

Tinker around and let me know what you work out.


----- Original Message -----
From: "Robert Schuff" <rob@...>
Newsgroups: egroups.ibobjects
To: <>
Sent: Thursday, June 05, 2003 7:12 AM
Subject: Re: [IBO] does a tiboquery in a prepared state consume resources on
the server?

> Excellent! Thanks Jason. I'll check it out.
> my seemingly odd question was asked in the context of Asta and IBO.
> Asta Providers interrogate their associated datasets for Parameters
> (through the tparams property) then stream the tparams down to the
> client-side dataset. I'm constructing tiboqueries dynamically (on the
> asta server) assigning only the sql property and need a way to have
> them prepared at the right time (just before the provider interrogates
> their tparams property) so the provider actually sees the params.
> If all I do with the TIBOQuery is assign the SQL property (and do
> define the tparams at design time) the provider doesn't know to call
> the tiboquery's prepare statement first. Looks like your solution
> would be perfect.
> thanks much!
> rob
> "IB Objects" wrote:
> > > subject line says it all. If I open an application and call
> > > prepare for
> > all
> > > of my queries, will this consume FB/IB server resources?
> >
> > Yes, but you can make a method call which will release the handle
> > back to the server and leave the query in its prepared state. It will
> > have to do the prepare again if you attempt to open it but that
> > shouldn't be too expensive.
> >
> > There is a method called FreeServerResources (I think) that will
> > release the handle back. This even works for a dataset with all
> > records fetched into memory.
> >
> > There could be a couple glitches with this feature yet so use it
> > carefully.... I'm still trying to make sure it is 100% effective. I
> > have to safeguard every possible usage of the handle and
> > transparently restore it and I may not have caught every angle of
> > usage.
> >
> > This is actually foundational development towards allowing even the
> > connection handle to go away and be brought back on demand.
> > Functionality of IBO v4.5.
> >
> > Regards,
> > Jason
> >
> >
> >
> --
> Rob Schuff