Hello Perl gurus I have a pipe delimited flat file with about 85 fields and and four hundred rows. After writing a small script using DBD:AnyData I noticed that the result data set returned from a simple query returned some colums as NULL values when there was actuall data in the column. The problem is not consistant either becuase if the query is modified by either adding or deleteing column names then the colum that showed NULL will show the data value. I was wonder if anyone else has had a similiar problem with DBD:AnyData or know of a workaround to this problem? Code snipped below.

my $dbh = DBI->connect('dbi:AnyData(RaiseError=>1):'); $dbh->func( 'DBTable', 'Pipe', "db.txt", $col_nm, 'ad_catalog' ) ; my $sth = $dbh->prepare( $sql ) ; $sth->execute() ; where $sql = select col1 , col2 , col3 , ... , colN from Depcorr where col1 = '12345' and $col_nm { col_names => 'col1,col2,col3,...colN' } ;

Unfortunately I am unable to display the columns name I actually used because of security reasons. TIA


In reply to dbd anydata does not return the correct result set by sajohn52

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.