"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.
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.
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;
}
|