Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

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

by electrosphere (Sexton)
on Feb 03, 2003 at 17:14 UTC ( #232310=note: print w/ replies, xml ) Need Help??


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

Perl is asking you to look hard at line 19...

You must run the 'do' on a defined database handle. The database handle is ruturned by the DBI->connect method. In your code this handle is stored in $db_object (I think $dbh would be a better identifier - database Handle).

Change line 19 to: $db_object->do($sql);

I think you want to use the prepare/execute methods when working with SQL Selects as the do method does not return a statement handle (see perldoc DBI for more info)


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

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (7)
As of 2015-07-30 11:22 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (271 votes), past polls