in reply to DBI: $dbh-disconnect; yes, now, now, but not now!

Not necessarily solving your problem, but is it a good thing to have to continually connect and disconnect to your database? There really isn't any harm in keeping the database connection open throughout the run of a program and it saves time and effort later.

Now, if you are closing the database in order to commit changes, I know the DBI has the facility to call COMMIT at any point without closing the DB connection. Or, optionally, if you aren't doing transactions, you can tell the DBI to AutoCommit, for those databases that support it. Otherwise, I don't send any need to open and close a DB connection except at the start and end of a program , respectively.


Dr. Michael K. Neylon - mneylon-pm@masemware.com || "You've left the lens cap of your mind on again, Pinky" - The Brain
  • Comment on Re: DBI: $dbh-disconnect; yes, now, now, but not now!