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