Subject: | DBD-XBase-0.241 Bug Report |
Date: | Wed, 18 Jun 2008 13:38:54 -0400 |
To: | bug-DBD-XBase [...] rt.cpan.org, adelton [...] fi.muni.cz |
From: | "Spithogianis, John" <John.Spithogianis [...] AIG.com> |
Greetings,
We have been using your DBD::Xbase module as a way to create blank .DBF
files and then add records to it. While I understand it is in standard .DBF
format, our programs use FoxPro files which calculate the field offset and
place it in the field descriptor at bytes 12-15. However, there seems to be
an error in the handling of this field address. Instead of starting at
location 1, as normal, the fields start at whatever length the first field
is. The field address is then offset by the length of the following field,
which differs from the FoxPro specification. The field address in FoxPro
should begin at 1 and then increment by the length of the current and
subsequent fields. Here is the output of the file created:
--------------------------------------
DBF File:
--------------------------------------
Version: 48 - Visual FoxPro
Mod Date: 3/12/2008
Header Length: 744
Record Length: 118
Fields: 14
Records: 90
--------------------------------------
Name Typ Loc Len Dec Flg
--------------------------------------
1 C 4 3 0 0
2 C 14 10 0 0
3 I 18 4 0 0
4 I 22 4 0 0
5 I 26 4 0 0
6 I 30 4 0 0
7 C 31 1 0 0
8 C 32 1 0 0
9 I 36 4 0 0
10 B 44 8 2 0
11 B 52 8 2 0
12 B 60 8 2 0
13 B 68 8 2 0
14 C 118 50 0 0
Here is the output of the original file created in FoxPro with the correct
field offset:
--------------------------------------
DBF File:
--------------------------------------
Version: 48 - Visual FoxPro
Mod Date: 3/12/2008
Header Length: 744
Record Length: 118
Fields: 14
Records: 90
--------------------------------------
Name Typ Loc Len Dec Flg
--------------------------------------
1 C 1 3 0 0
2 C 4 10 0 0
3 I 14 4 0 0
4 I 18 4 0 0
5 I 22 4 0 0
6 I 26 4 0 0
7 C 30 1 0 0
8 C 31 1 0 0
9 I 32 4 0 0
10 B 36 8 2 0
11 B 44 8 2 0
12 B 52 8 2 0
13 B 60 8 2 0
14 C 68 50 0 0
I have also noticed this error in previous versions of XBase. While it
appears that the module has not been updated in some time, I thought it
would be helpful to bring this to your attention. Thank you for your time.
Best Regards,
John Spithogianis
Message body is not shown because it is too large.