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)
In reply to Re: Can't call method "do" - DBI Troubles
by electrosphere
in thread Can't call method "do" - DBI Troubles
by vbrtrmn
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |