Subject Re: Converting VFP to Dbase or importing into VFP into dbase
From Mervyn Bick <invalid@invalid.invalid>
Date Mon, 13 Oct 2014 17:31:25 +0200
Newsgroups dbase.getting-started

On Mon, 13 Oct 2014 16:35:13 +0200, Mike <mike@trrap.com> wrote:

> I am stuck and did not find an answer via the FAQ or google.
> I have 100's of VFP tables (.dbf) and would like to convert them to a  
> dbase file type. Most all have indexes but I dont mind rebuilding those  
> in dbase.  In the Dbase command window I used: Use? and opened the vfp  
> table and got a database engine error. Corrupt table/Index header.
> Next I open the table in VFP and got rid of the indexes and attempted to  
> reopen in dbase same error.
> I reopened my file in VFP and did a export to type dbase IV same error  
> when opening in dbase.
> I then tried several copy structure to commands and dbase is throwing  
> the same error.
> I was looking at a dbase program using VFP files but that wont work  
> using the BDE so I want to evaluate converting then to dbase and  
> rewriting our programs.
> Thank you
> Mike

The file headers for VFP .dbf and dBASE .dbf files are very similar for  
dBASE level 3 and level 4 files.  Only the headers are different, the  
actual data in the tables looks to be held in the same format.  Compare  
the structures at  
http://msdn.microsoft.com/en-us/library/aa975386%28v=vs.71%29.aspx   and  
http://www.ivanfm.com/files/docs/specs/xbase.htm

It should be possible (famous last words <g>) to write a little program  
that will run through all the VFP  files (copies, of course, in case it  
screws everything up <g>) and  make them readable by dBASE.  Once dBASE  
can read them dBASE itself can be used to create level 7 tables if  
necessary.

The alternative is to export from VFP as .csv files and then import the  
.csv files into dBASE.  The problem here is that you will need to create  
the empty dBASE file first.  One or two files, not a problem.  100's - a  
major PITA!

Mervyn.