On Thu 24 Jan 2002 21:27, Tim Bunce <[EMAIL PROTECTED]> wrote: > On Thu, Jan 24, 2002 at 04:21:49PM +0000, Simon Oliver wrote: > > Tim Bunce wrote: > > > > > > Sigh. > > > > > > No one need ever call finish except when they know that they have not > > > fetched all their data. > > > > Yes, according to the DBI docs, but in practice I have found that sometimes it > > is necessary to issue $sth->finish prior to $dbh->disconnect even though all > > data from a statement handle has been retreived. The error is something like > > disconnect invalidates active statement handle. > > > > I guess this is a problem with individual DBD's and may have been fixed > > recently (I can't actually reproduce this error today or I would give an > > example - lame?). I seem to remember it always happening with one or both of > > DBD::Pg and DBD::MySQL. > > Old versions of DBD::mysql had a bug. Maybe DBD::Pg has as well. > > But the "disconnect invalidates active statement handles" warnings > can also indicate logic problems in your own code (unless your using > RaiseError) which slapping in finish() calls will simply mask.
In the case of DBD::Unify, where this is a very actual problem, the cause lies in the fact that the E/SQL design is *missing* a DEALLOCATE statement, which makes me have to jump through lots of hoops to prevent those messages when they are not appropriate. One thing I found that *realy* helps prevent these problems is destruction of the handles (not the finish), as an example posted earlier. Another Unify problem (not a DBI or DBD problem, is that the E/SQL libraries inhibit multiple database handles, at least unless the handles all point to the same database, which is quite useless. I hope this is solved in version 8, comming up soon. A third problem with Unify is that they only support static libraries :( > Tim. Now what would be a solution for a problem stated either here or on another group related to new perl builds and the use of DBI/DBD. Sybase (I think) only ships their new products with 64bit libraries, which have - of course - to be linked against a 64bit application, like perl built with -Duse64bitall. This is no problem for DBI, but what if this user wants both Sybase/64 *and* Unify (unlikely, I know, but there are probably better examples to be thought of) a database that (so far) only supports 32bit (static) builds and thus requires a 32bit perl. Is this something to put to p5p? -- H.Merijn Brand Amsterdam Perl Mongers (http://amsterdam.pm.org/) using perl-5.6.1, 5.7.1 & 630 on HP-UX 10.20 & 11.00, AIX 4.2, AIX 4.3, WinNT 4, Win2K pro & WinCE 2.11 often with Tk800.022 &/| DBD-Unify ftp://ftp.funet.fi/pub/languages/perl/CPAN/authors/id/H/HM/HMBRAND/
