Subject Re: [IBO] Prepare + unprepare + close with IB_Query or IB_Cursor?
Author sdbeames
--- In IBObjects@y..., "Jason Wharton" <jwharton@i...> wrote:
> > AFAIK, there is no need to call unprepare and close.
>
> There is if you want the resources on the server allocated to that
statement
> to be released.
> Otherwise, that won't happen until the connection is disconnected
or the
> object instance is destroyed.
>
> My rule of thumb is, if you aren't going to use a statement again
in its
> prepared state then Unprepare it.
> Keep something prepared for an on-going process or something that
you want
> primed and ready to go.
>
> HTH,
> Jason Wharton

The Borland help file says things like:
Note: If you attempt to execute a stored procedure before
preparing it, the stored procedure component automatically prepares
it for you, and then unprepares it after it executes.

Does the same apply to a TIB_DSQL? ie can I be lazy when re-using
one? If I'm changing the SQL each time before use, and only using it
for a single fetch each time, will it automatically Prepare &
Unprepare itself?

Thanks,
Steve