in reply to Re: DBI Long File names?
in thread DBI Long File names?
UPDATE Place Holders don't appear to be the solution.
Page 221 of Programming the Perl DBI:
This seems to imply the problem may lie in the driver? (I'm guessing) Am I off base with this? I also added the following snippet to try to capture the table name from the database and then open the table. Again everything works when 8.3 names are used. I get the extra character in SQL statement error for the weird names."SELECT name,age FROM ?" # wrong will probably fail. With most drivers, placeholders can't be used for any element of a sta +tement that would prevent the database server from validating the sta +tement and creating a query execution plan for it.
Comment out or replace read_log(shift) with get_table_list(shift) in the first listing and add the following subroutine. It is supposed to print the table name then dump the table for every table in the database.
sub get_table_list ($) { my $log = shift; my $dbobject = DBI->connect("DBI:XBase:".$basedir.$logdir) or die $DBI::errstr; my @tables = $dbobject->tables; print "Database contains the following tables:\n__________________ +______\n"; foreach my $table (@tables) { print "$table\n"; read_log($table); } print"\n\n"; $dbobject->disconnect; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Re: DBI Long File names?
by iburrell (Chaplain) on Sep 30, 2003 at 17:22 UTC | |
by talwyn (Monk) on Oct 02, 2003 at 15:07 UTC | |
by talwyn (Monk) on Oct 06, 2003 at 18:52 UTC |