"Curt Russell Crandall" <[EMAIL PROTECTED]> wrote:
> Phil,
>
> I ran into a similar problem with Sybase. I had a statement prepared
> using placeholders (a select statement) and I had to loop several times as
> I processed transactions and each time through the loop I had to execute
> the prepared statement. Perl and/or Sybase complained that I needed to
> finish the statement handle.
> Using finish doesn't mean you have to keep repreparing the statement
> handle... according to the Cheetah book, it's a rarely used functions used
> for "internal housekeeping". In my program, I prepare my frequently used
> select statements in an init method and assign the statement handle to an
> object attribute. I have no need to prepare the statement more than once
> and explicitly finish()'ing a handle after a fetch* didn't cause any
> noticable decrease in performance. So I don't think using finish is any
> sort of a "nasty workaround". I would just try to remove the multiple
> prepare()'s and prepare the statement up front, then just finish() after
> each fetch*. Hope it helps.
Curt,
That realy does help! You have disabused me of the notion that I have to
reprepare after every call to finish.
Thank you very much!
Phil