Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re: Re: Can't call method "do" - DBI Troubles

by Hero Zzyzzx (Curate)
on Feb 03, 2003 at 17:58 UTC ( [id://232330]=note: print w/replies, xml ) Need Help??


in reply to Re: Can't call method "do" - DBI Troubles
in thread Can't call method "do" - DBI Troubles

You can use the RaiseError option in the connect() method to automatically "status check" all calls to database functions, a nice little time saver. Note: you still have to status check the connect() method itself. . .

my $dbh=DBI->connect($db,$username,$pass,{RaiseError => 1}) or die("Co +uldn't connect to database ".DBI::errstr);
and the statement
$dbh->do($sql);
will automatically have status checking done for it, as well as any other calls to DBI.

-Any sufficiently advanced technology is
indistinguishable from doubletalk.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others having an uproarious good time at the Monastery: (3)
As of 2024-04-19 19:54 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found