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 :) |