Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re: DBI won't let go!

by strider corinth (Friar)
on Dec 06, 2002 at 20:46 UTC ( [id://218149]=note: print w/replies, xml ) Need Help??


in reply to DBI won't let go!

This may be off-topic, but it may be helpful to you anyway. There are a couple of odd things about your code. I don't know the specifics of what you're trying to do, but the reason that the prepare() and execute() statements are separated is so that you don't have to do a connect() each time you want to do something in the database. Your program will run a lot faster like this:
$dbh = DBI->connect( 'Blah', 'Blah', 'Blah', 'Blah' ); # $dbh->LongReadLen( 65535 ); # since you're not fetching any data, th +is line doesn't do anything useful $stmt = $dbh->prepare( "UPDATE Images SET Name = ?" ); for(@JpgList){ $stmt->execute( $_ ); rename("$_","Processed/$_"); } $stmt->finish; $dbh->disconnect;
It's possible that changing this will fix the problem. DBI could be blocking on any of those commands. You should probably include some of the error checking mentioned in the DBI documentation, and make sure you're using strict and warnings.
--
Love justice; desire mercy.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://218149]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others scrutinizing the Monastery: (4)
As of 2024-03-28 21:15 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found