I thought so too. However, neither the use of single quotes nor the $dbobject->quote method works. I read some about placeholders but I don't see an example where they are used for a tablename. Also the Win32 perldoc is drainbamaged and doesn't support unix style searches. If you have a copy of 'Programming the Perl DBI' page number quotes would be helpful. I read a bit on pg 194... but the explanation seems a bit sparse.

UPDATE Place Holders don't appear to be the solution.
Page 221 of Programming the Perl DBI:

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

In reply to Re: Re: DBI Long File names? by talwyn
in thread DBI Long File names? by talwyn

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.