in reply to Can't call method "do" - DBI Troubles
The reason your code is not working is because you first assign the reference to the DBI object (commonly called the Database handle, hence $dbh) to db_object:
after which you try to access it through a new variable $dbh, which is of course undefined:my $db_object = DBI->connect($db, $username, $pass);
hence the error. I suspect that you put in the my because the compiler complained about a missing package name on $dbh. You need to drop the my.my $dbh->do($sql);
CU
Robartes-
|
|---|