I tried to reproduce your problem with XBase, but couldn't. Since excel seems to fix the problem, I suggest you save an original copy of the file, then fix it in excel and save it again, then run diff on the two files to find out what's different between them.

--
Jeff

Isabel Carvalho wrote:

Hello !

I thought the problem was related to an unpopulated field at the end of the
Header, since the message I get when accessing the dbf file is
'DBD::XBase::st execute failed: Table xxxxxx not found: Missmatch in header
of xxxxx: record_len 2048 but offset 1696', but you're right, it's not !
I get this file from a fax gateway (like of a black box we don't have
access to) and the ftp worked fine before. We know the gateway changed, but
don't have much info on what changed !
I guess it probably has to do with the format of the file, since it works
fine when I just open the file and save it again with Excel. Excel must be
formatting it correctly ! Is there a way I can check the version of the
file ? Must I install a new version of XBase ? I am currently running XBase
0.232 under PERL v5.8.0.
I am getting pretty confused with this, I don't know what else to check and
do, so I really appreciate any ideas you may have.
Thanks !

Isabel





Jeff Zucker <[EMAIL PROTECTED] To: Isabel Carvalho <[EMAIL PROTECTED]> com> cc: [EMAIL PROTECTED] Subject: Re: DBI:XBase error when reading dbf file 06/07/2003 06:00 PM




Isabel Carvalho wrote:




When I try to read a dbf file, using XBase in PERL, I immediately have an
error:
'DBD::XBase::st execute failed: Table xxxxxx not found: Missmatch in


header


of xxxxx: record_len 2048 but offset 1696'

I believe the last field mentioned in the Header is not populated in the
actual records, therefore the mismatch, but I really need to read the file
!



Just having a column unpopulated probably isn't the problem -- if I
create a new table in DBD::XBase and only populate the first column, it
reads fine (and all columns start out unpopulated).  So maybe it's a
problem with the type of that column (is it a memo field?) or the name
of the column (is it a SQL-compliant name?) or something about whatever
created the table (how was the table created?)   Did you transfer the
table via FTP in a way that may have modified the line endings of the
table?  If none of those questions provide an answer, maybe you should
post a small sample table that illustrates the problem.  Also tell us
what version of DBD::XBase, XBase, DBI, and perl you are using and on
what OS.

--
Jeff














Reply via email to