Re: perl DBI disconnect question

2002-05-16 Thread Harry Jackson
> > From: Felix Geerinckx[SMTP:[EMAIL PROTECTED]] > > exit the script to prevent it from having to run through the rest > of it needlessly. do I need to explicitly disconnect before exiting >in those instances or it it OK to just exit? You can always put the >following in your script: > > E

Re: perl DBI disconnect question

2002-05-16 Thread Felix Geerinckx
on Thu, 16 May 2002 18:03:12 GMT, Rory Oconnor wrote: > > Regarding perl DBI - I know it's proper to use $sth->finish and > $dbh->disconnect and I am doing that at the end of my script... > > however, i am also doing alot of error checking at the beginning of the > script (to make sure data has

Re: perl DBI disconnect question

2002-05-16 Thread Todd Wade,,,Room 108
Rory Oconnor wrote: > > Regarding perl DBI - I know it's proper to use $sth->finish and > $dbh->disconnect and I am doing that at the end of my script... > > however, i am also doing alot of error checking at the beginning of the > script (to make sure data has been entered, and formatted prope

Re: perl DBI disconnect question

2002-05-16 Thread José Nyimi
I'm not a DBI guru but I guess if you "try and catch" your DBI exception handling with eval, you can exit properly at all. I mean: eval{ $dbh=DBI->connect($connect_string); $sth=$dbh->prepare($sql); $sth->execute(); #some fetch here $sth->finish(); $dbh->disconnect(); } if($@) { print "program