At 21:23 -0500 1/14/02, Mark Riehl wrote: >All - Running ActiveState under Win2k. I've got a Tk script that acts as a >front end for SQL queries, and I'm using dump_results. > >print "\$sql_statement = $sql_statement\n"; >my $sth = $dbh->prepare($sql_statement); > ># the sql result is store in $sth >$sth->execute() > or die "Can't execute SQL statement : $dbh->errstr"; > >my $csv; >my $SH = IO::Scalar->new(\$csv); >my $rows = $sth->dump_results(80, "\n", ",", $SH); >$SH->close; > >I get the following in the console: > >$sql_statement = SELECT * FROM network >Database handle destroyed without explicit disconnect at >C:/Perl/site/lib/Tk.pm >line 217. >Tk::Error: Not a GLOB reference at C:/Perl/site/lib/DBI.pm line 614. >[\&main::run_query] >Tk callback for .button >Tk::__ANON__ at C:/Perl/site/lib/Tk.pm line 217 >Tk::Button::butUp at C:/Perl/site/lib/Tk/Button.pm line 111 >(command bound to event) >I establish the connection and successfully make the query - I can see the >results when I have the trace on, but I can't seem to track down the >problem. Works fine locally, problem using it remotely. Account, password, >and permissions are correct, no firewalls. >Any suggestions?
$dbh->disconnect(); at the end of your script. You never close the connection. > >Thanks, >Mark > >- >Mark Riehl >Agile Communications, Inc. >Email: [EMAIL PROTECTED] >Office: (732) 528-9305 >Fax: (732) 528-9308 >Cell: (732) 996-7630
