Hi.

----- Original Message -----
From: "Mark Riehl" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, January 15, 2002 11:23 AM
Subject: MySQL Question


> 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.
(snip)
> 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.
This line tells you what is happened.
You should set GLOB reference (not IO object).
How about this?(cf.  perldoc IO::Scalar)

  my $csv;
  my $SH = tie *OUT, 'IO::Scalar', \$csv;
  #my $SH = IO::Scalar->new(\$csv);
  my $rows = $sth->dump_results(80, "\n", ",", \*OUT);
  $SH->close;
  print $csv;

==============================================
Kawai, Takanori(Hippo2000)
   Mail: [EMAIL PROTECTED] [EMAIL PROTECTED]
   http://member.nifty.ne.jp/hippo2000
==============================================


Reply via email to