Unfortunately I have to disagree a bit with the other posters. It is not necessary to call $sth->finish() and if you find it so I suspect it is due to an old version of the DBD::ODBC module. I had the same problem earlier this year and reported it on the DBI-users mailing list. The author of DBI had this reply. The problem was fixed in subsequent releases of DBD::ODBC (1.02 and onwards).

So, if you see this problem you should upgrade DBD::ODBC. If you are running ActivePerl you can do so by going to a command line and typing:
ppm install ftp://ftp.esoftmatic.com/outgoing/DBI
(My memory might be off, but I think you might need a .ppd on the end of that -- not sure). Hope this helps!
-Tats


In reply to Re: DBI (Prepare once execute many fails) by Itatsumaki
in thread DBI (Prepare once execute many fails) by ColtsFoot

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.