Foxmonkey


Hello. I am a novice user of Foxpro, occaisionally using Foxpro 2.6 for Dos for data manipulation.

I am wondering if there is an easy and free way to convert DBF files produced with Visual Foxpro with 2.6D. We get batches of files that are produced by some later version (it signs a "30" in byte zero of the header, while our tables have the "03"). I get a message stating it is "Not a table" and will not open as is.

Is it possible to safely overrwrite byte zero with "03" to make compatible, and would any additional changes be required to the header to avoid corruption/problems

Thanks




Re: Opening VFP tables with Fox2.6 (Dos)

dni


You may use function Export from Visual Foxpro and convert tables in FoxBase+ format. That format makes tables available from all foxpro versions.





Re: Opening VFP tables with Fox2.6 (Dos)

Naomi Nosonovsky

I'm not sure if only header manipulations are required. If you have VFP installed somewhere, when you would be able to do

COPY to myFox2X type Fox2X (or FoxPlus).

However, it may be a way to manipulate the file directly, needs some research.






Re: Opening VFP tables with Fox2.6 (Dos)

CetinBasoz

0x03 in header means it's a Foxplus file. 0x30 is for fox2x, VFP tables have 0x31. So I'm not sure what type of conversion you need. Just changing the first byte is not sufficient for conversion. For example fox2x files field header records are followed by a header termination flag (0x0D) followed by data records while VFP tables have an 263 bytes baclink info following the terminator.

Use VFP for conversion if you need (copy ... type fox2x). But I'd use data manipulation routines directly from within VFP with some modification if necessary.





Re: Opening VFP tables with Fox2.6 (Dos)

Foxmonkey

Thanks to the authors of this and the two previous posts. VFP is not an option, we just do not have it.

Changing the first byte actually does work in some cases, but not all. I'm still trying to nail down the reason for this. My intention is still to manufacture a "replacement" header, I presume some things are going to have to be stripped or altered (like the db container link you mentioned).

Thanks




Re: Opening VFP tables with Fox2.6 (Dos)

Naomi Nosonovsky

I found http://fox.wikis.com/wc.dll Wiki~NotATable and also inside VFP you may check table version type using sys(2029) function. However, I'm not sure if this information would be enough. Perhaps it can be a starting point.



Re: Opening VFP tables with Fox2.6 (Dos)


Re: Opening VFP tables with Fox2.6 (Dos)

Cindy Winegarden

Hi!

If you have other Microsoft data tools such as MS Access you can FoxPro and Visual FoxPro ODBC driver (downloadable from p://msdn2.microsoft.com/en-us/vfoxpro/bb190233.aspx) to link up the tables and either use them there or export them to another format.

A web search on "Viewer DBF" turned up several things including http://www.coolutils.com/DBFViewer which claims to be freeware, and http://www.dbfview.com/order.html and http://www.dbf2002.com/, neither of which is expensive.






Re: Opening VFP tables with Fox2.6 (Dos)

Naomi Nosonovsky

CetinBasoz wrote:

0x03 in header means it's a Foxplus file. 0x30 is for fox2x, VFP tables have 0x31. So I'm not sure what type of conversion you need. Just changing the first byte is not sufficient for conversion. For example fox2x files field header records are followed by a header termination flag (0x0D) followed by data records while VFP tables have an 263 bytes baclink info following the terminator.

Use VFP for conversion if you need (copy ... type fox2x). But I'd use data manipulation routines directly from within VFP with some modification if necessary.

Not according to the Table File Structure:

File type:
0x02 FoxBASE
0x03 FoxBASE+/Dbase III plus, no memo
0x30 Visual FoxPro
0x31 Visual FoxPro, autoincrement enabled

0x32 Visual FoxPro, Varchar, Varbinary, or Blob-enabled
0x43 dBASE IV SQL table files, no memo
0x63 dBASE IV SQL system files, no memo
0x83 FoxBASE+/dBASE III PLUS, with memo
0x8B dBASE IV with memo
0xCB dBASE IV SQL table files, with memo
0xF5 FoxPro 2.x (or earlier) with memo
0xFB FoxBASE





Re: Opening VFP tables with Fox2.6 (Dos)

CetinBasoz

You're right. In VFP9 documentation it's not lined up correctly and I read as if the versions were on right (were on left in fact).

File type: 0x02

FoxBASE: 0x03

FoxBASE+/Dbase III plus, no memo: 0x30

Visual FoxPro: 0x31

...