in reply to Re: DBD::CSV::st execute failed. No such file or directory at C:/Perl64/lib/DBD/File.pm line 565
in thread DBD::CSV::st execute failed. No such file or directory at C:/Perl64/lib/DBD/File.pm line 565
Here is my revised codeUse of uninitialized value in concatenation (.) or string at .. line 5 +5.
use warnings; use strict; use DBI; # Create connection string to database point.csv my $dbh = DBI->connect ("dbi:CSV:", undef, undef, { f_ext => ".csv/r", f_encoding => "utf-8", }); my $sth = $dbh->prepare ("select * from point where ID_DEVTYP like 'IN +TELI%' AND ID_POINT like 'AUTO%'"); $sth->execute; # Create AFS CSV with Columns open (DAT_OUTPUT,">AFS.csv"); print DAT_OUTPUT "RECORD,SUBSCRIPT,ID_SUBSTN,CO_SUBSTN,AREA_SUBSTN,ID_ +DEVTYP,ID_DEVICE,NAME_DEVICE,AREA_DEVICE,ID_MEAS,ID_POINT,SITE_POINT, +AREA_POINT\n"; # Cycle through SQL results on ROW basis and print to AFS CSV file while (my $row = $sth->fetchrow_hashref) { print DAT_OUTPUT "$row->{RECORD},$row->{SUBSCRIPT},$row->{ID_SUB +STN},$row->{CO_SUBSTN},$row->{AREA_SUBSTN},$row->{ID_DEVTYP},$row->{I +D_DEVICE},$row->{NAME_DEVICE},$row->{AREA_DEVICE},$row->{ID_MEAS},$ro +w->{ID_POINT},$row->{SITE_POINT},$row->{AREA_POINT}\n"; } # Close file close DAT_OUTPUT;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: DBD::CSV::st execute failed. No such file or directory at C:/Perl64/lib/DBD/File.pm line 565
by Tux (Canon) on Jun 18, 2014 at 06:19 UTC | |
|
Re^3: DBD::CSV::st execute failed. No such file or directory at C:/Perl64/lib/DBD/File.pm line 565
by poj (Abbot) on Jun 17, 2014 at 20:26 UTC | |
by PrincessofPERL (Initiate) on Jun 18, 2014 at 03:38 UTC | |
by Anonymous Monk on Jun 18, 2014 at 03:41 UTC | |
by Tux (Canon) on Jun 18, 2014 at 06:34 UTC |