> -----Original Message-----
> From: perl-win32-users-boun...@listserv.activestate.com [mailto:perl-
> win32-users-boun...@listserv.activestate.com] On Behalf Of John
> Sent: 19 May 2013 05:04
> To: pw32-users
> Subject: help dbd-anydata / dbi-dbd-sqlengine issue
>
> Hi
>
> Several years ago I dabbled with DBD::AnyData to read and merge a variety
> of csv data files. Recently I updated my DBI module to version
> 1.625 (and yesterday to 1.627). Since updating DBI my program has failed
> with an error message similar to that below (I have included a test script
> below that produces the error message).
>
> I would like advise on how to raise this with the appropriate
> developers/maintainers.
>
> Have I included enough info here for the developer/maintainer to track the
> problem? If not, what else should I include?
>
> I have provided my current perl version info below, I also have an older perl
> installation (v5.10) on my computer with DBI v1.616 and DBI-DBD-SqlEngine
> v0.03 that do not fail as reported here.
>
> Thanks
> John
>
> #[perl version]###########################
> I am currently using ActiveState ActivePerl V5.14.
> 12:26>perl -v
>
> This is perl 5, version 14, subversion 2 (v5.14.2) built for 
> MSWin32-x86-multi-
> thread (with 1 registered patch, see perl -V for more
> detail)
>
> The DBI-DBD-SqlEngine module concerned is version 0.06.
>
> #[err msg]#################################
> DBD::AnyData::db do failed:
> Execution ERROR: Can't call method "complete_table_name" on an
> undefined value at C:/bin/Perl/Perl514/site/lib/DBI/DBD/SqlEngine.pm line
> 1503.
>   called from tst_mkAP.pl at 10.
>
>   at C:/bin/Perl/Perl514/site/lib/DBI/DBD/SqlEngine.pm line 1239
>   [for Statement "CREATE TABLE AP_mem (
>           date_index    INTEGER,
>           amount        VARCHAR(15),
>           acc1          VARCHAR(8),
>           acc2          VARCHAR(8),
>           description   VARCHAR(30),
>           voucher       VARCHAR(5),
>           costctr       VARCHAR(5),
>           date          VARCHAR(12)
>        )"] at tst_mkAP.pl line 10.
> #[\err msg]#################################
>
> #[test script]#########################
> #! perl -w
> use strict;
> use warnings;
> use DBI;
>
> # define transient storage table
> sub mk_APmem {
>     my $dbh = shift @_;
>
>     $dbh->do(
>        qq{CREATE TABLE AP_mem (
>           date_index    INTEGER,
>           amount        VARCHAR(15),
>           acc1          VARCHAR(8),
>           acc2          VARCHAR(8),
>           description   VARCHAR(30),
>           voucher       VARCHAR(5),
>           costctr       VARCHAR(5),
>           date          VARCHAR(12)
>        )}
>     );
>
>     my $insert   = qq{
>        INSERT INTO AP_mem
>        (date_index,  amount,  acc1, acc2, description,   voucher,
> costctr, date) VALUES
>        (         ?,       ?,     ?,    ?,           ?,         ?,
> ?,    ?)
>     };
>     # and return insert statement
>     return $insert;
> }
>
> my $dbh = DBI->connect('dbi:AnyData(RaiseError=>1):');
>
> my $flags = {
>     col_names   => 'Date,Description,AccNum,Debit,Credit'
> };
>
> my $file = "C:\\Documents and Settings\\John\\My
> Documents\\dnload\\10457109_20130514.dat";
>
> #    my ($file, $flags, $dbh) = @_;
>
>     # define data source
>     # $dbh->func('CRU_in', 'CSV', $file, $flags, 'ad_catalog');
>     $dbh->func('CRU_in', 'Pipe', $file, $flags, 'ad_catalog');
>
>     # define transient storage table and return insert SQL Statement
>     my $putAP = mk_APmem($dbh);
>
> print "$putAP\n";
>
> #[\test script]#########################

Have you tried the method suggested on the documentation? (See BUGS section in 
'perldoc DBI::AnyData').

HTH

--
Brian Raven

________________________________

Please consider the environment before printing this e-mail.

This e-mail may contain confidential and/or privileged information. If you are 
not the intended recipient or have received this e-mail in error, please advise 
the sender immediately by reply e-mail and delete this message and any 
attachments without retaining a copy.

Any unauthorised copying, disclosure or distribution of the material in this 
e-mail is strictly forbidden.
Please consider the environment before printing this email.

Visit our website at http://www.nyse.com

****************************************************

Note:  The information contained in this message and any attachment to it is 
privileged, confidential and protected from disclosure.  If the reader of this 
message is not the intended recipient, or an employee or agent responsible for 
delivering this message to the intended recipient, you are hereby notified that 
any dissemination, distribution or copying of this communication is strictly 
prohibited.  If you have received this communication in error, please notify 
the sender immediately by replying to the message, and please delete it from 
your system.  Thank you.  NYSE Euronext.

_______________________________________________
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to