Hi Holger,

I see you have 'B' (binary?) type for many fields, I'm not familiar with this type, but the year and month data type should be integer or numeric with 0 decimal places - N(4,0) for example.

Regards, Stefan

Update: Table with the official list of column types supported by the module:

use strict; use warnings; use DBI; my $dbf_dir = '.'; my $table = 'test_types'; my $dbh = DBI->connect("DBI:XBase:$dbf_dir") or die $DBI::errstr; my $def =<<"STR"; CREATE TABLE $table ( str_1 CHAR, num_1 NUMERIC(8,2), num_2 INTEGER, num_3 FLOAT, bol_1 BOOLEAN, blb_1 BLOB, blb_2 MEMO, dat_1 DATE, tim_1 TIME, dat_2 DATETIME ) STR unlink "test_types.dbf", "test_types.dbt"; $dbh->do($def);

Update2: Interesting, the other interface (non DBD) XBase can make B type columns, but the length is 10 and decimal places 0, ignoring the parameters:

use strict; use warnings; use XBase; my $newtable = XBase->create( "name" => "with_b.dbf", "field_names" => [ "ID", "MSG", "BIN" ], "field_types" => [ "N", "C", "B" ], "field_lengths" => [ 6, 40, 18 ], "field_decimals" => [ 0, undef, 2 ] ) or die XBase->errstr;

So, my guess is that B(8,6) is a erroneous type.

Update3: 'B' = Type Double :)


In reply to Re^7: Problem with DBI, DBD::XBase by stefbv
in thread Problem with DBI, DBD::XBase by hgtmp

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.