Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

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

by Hero Zzyzzx (Curate)
on Feb 03, 2003 at 17:58 UTC ( #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
Node Status?
node history
Node Type: note [id://232330]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (3)
As of 2021-05-17 23:08 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Perl 7 will be out ...





    Results (170 votes). Check out past polls.

    Notices?