Anyone got any any idea what is happening here

$dbh=DBI->connect("dbi:Pg:dbname=data_cc",$user,$pw);
$dump_dir='/home/data_cc/dump';
@names=$dbh->tables();
#$dbh->execute;
#print @names;
foreach $names(@names){
if (substr($names,0,9) eq "public.tb")
{
$file1= "$dump_dir\/$names";
$dbh->prepare("COPY $names TO ? WITH DELIMITER AS #");
$dbh->bind_param(1,$file1);
$dbh->execute();
}
}

results in output


[Mon Mar 14 17:30:10 2005] [error] [client 127.0.0.1] Can't locate
object method "bind_param" via package "DBI::db" at /home/www/cgi-
bin/dump_all.pl line 25.

confused - it seems to be losing the connection to the db


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to