DBD-Sybase: BULK-Load and "disconnect invalidates 1 active statement handle"

"Humphrey Widjaja" <[email protected]> Sat, 26 Aug 2006 23:55:15 +0800
Newsgroups gmane.comp.lang.perl.modules.dbi.sybase
Message-ID <[email protected]>
Hi All,

I'm using Bulk-Load in DBD::Sybase. When I run:

   $dbh->commit;
   $sth->finish;
   $dbh->disconnect;

I got a warning message "disconnect invalidates 1 active statement handle".
It's gone when I change it to:

   $dbh->commit;
   $sth->finish while ($sth->{Active});
   $dbh->disconnect;

Why do I need to run "$sth->finish()" two times after "$dbh->commit()"?
Is my code okay to run finish() while it's active?

Regards,
Humphrey Widjaja

ps:
- I know DBI::finish is not strictly required
- The sample code in DBD::Sybase manual is also giving same error
- I use DBI v1.52 and DBD::Sybase v1.07