Link to home
Start Free TrialLog in
Avatar of Member_2_7965240
Member_2_7965240

asked on

Delphi Dbf export problem to a Visual Foxpro application

Hello,

I need to export some data from Delphi in dbf files. The receiver application was made by Visual Foxpro.

Because I got the sample dbf files - just to be sure - I embedded them in the exe files - untouched.
During the export I extract these files in a directory with SaveResourceAsFile and add the records.

On my computer (Windows 7) works excellent.
However the files produced on the customer's computer (Win10) the files appears corrupt by the Visual Foxpro application.
This is interesting because these "corrupt" files can be opened easily with Database Desktop and DBF Commander.

So in short:
- the dbf files created on my computer can be opened by Database Desktop ,DBF Commander and Visual Foxpro application
-the dbf files created on the  customer's computer can be opened by Database Desktop ,DBF Commander but not on Visual Foxpro application (and neihter by Visual Foxpro itself).

What can cause this problem?

Thank you.
Avatar of Dave Baldwin
Dave Baldwin
Flag of United States of America image

There are many variations on the DBase/Xbase file format.  What program is the customer using to create the files?
Are you talking about equal DBF file which you can open on your PC but not on customer's PC?
Does this file contain memo and/or index file? (DBF commander can suppress the error when these files are missing)
What error reports VFP application?
Are you able to open the DBF file created at customer's PC in VFP on your PC?

The memo is named equally as the original DBF just the extension is FPT. Index has CDX extension.

The best you can do is to attach both DBF files here (add .TXT extension to their names) and we'll tell what kind of the file it is.
Or you can open it in any hexadecimal editor and post the print screen of the first block.
Avatar of Member_2_7965240
Member_2_7965240

ASKER

There are many variations on the DBase/Xbase file format.  What program is the customer using to create the files?
If you mean the original files: Visual Foxpro.
Does this file contain memo and/or index file?
Dbf and Fpt
What error reports VFP application?
Error DBFNTX/1012  Corruption detected: .\export.DBF
Are you able to open the DBF file created at customer's PC in VFP on your PC?

Open in new window

I haven't got VFP, but the company whose software I need to export can't.
The best you can do is to attach both DBF files here (add .TXT extension to their names) and we'll tell what kind of the file it is.

It contain confidential data so I would send them in private if you want. But I will attach the print screen.
OK, DBF+FPT.  Does the SaveResourceAsFile create both files?
If it creates just one of these two files but the second one is present in older version then the error can appear.
So try to delete existing files at customer side and create them again.

Also, are you sure the application is written in Visual FoxPro?  The error message rather points to Clipper.

You may send corrupted files to e-mail address from my EE profile and I'll check them. Alternately you may download the Visual FoxPro 9 SP2 Run-Time modules and the VRunFox 9 application and try to open the DBF on your PC directly.
OK, DBF+FPT.  Does the SaveResourceAsFile create both files?
Yes, bots files are created.
Also, are you sure the application is written in Visual FoxPro?  The error message rather points to Clipper.
The company claims the use Visual FoxPro
I will send the corrupted files.
ASKER CERTIFIED SOLUTION
Avatar of Pavel Celba
Pavel Celba
Flag of Czechia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial