Error opening with Visual Foxpro

Jul 4, 2009 at 11:09 PM

When trying to open individuals.dbf with Visual Foxpro 6.0 sp3, I get this error. Memo file E:\DbfDotNet\demoapplication1.bin.infividuals.dbt is missing or invalid.

The same error occurs when I create another test dbf. I can add the data to files OK, but cannoy view using VFP. Any suggestions?

Also is it possible to create a dbf file with a numeric field? If so how?


Regards Max Campsell


Jul 5, 2009 at 6:11 PM

i dont think the dbf files are fully valid yet. Have you tried changing the dbf file version in the code?

Jul 5, 2009 at 7:14 PM

Yes. I have tested all three(3), same error. All the other files in the test directories, t0..t6 open in VFP ok. In Core.DbfFile.cs there is a line; mDbfHeader.VerNumber = 131; could this be the problem? The rest of my testing is very satisfactory, speed in reading files, speed in creating large files, 20,000 records, from a linq created list. The results are excellent, as soon as I can get over the file version problem, I will do some speed comparison tests, and advise you.


Jul 5, 2009 at 7:33 PM

t0-t6 were not created with dbfdotnet they are some examples that were sourced from the net I think. I dont really know much about dbf files so i cant reall help with the version number.

Jul 5, 2009 at 7:43 PM

OK. That explains why they are able to be opened. I will continue to test and see if I can find the problem. Thanks for the prompt reply.

Jul 6, 2009 at 10:00 PM
Edited Jul 6, 2009 at 10:26 PM

I was on holiday.

Yes you're right the Visual Foxpro files are largerly untested at this stage.

You're right, the samples come from

At some point I was able to preview all sample files, apart from the more complicated memo fields.

I then started to implement memo fields and this is probably why the samples are not working anymore.

I will spend some time on this now that I am back from holiday.


Jul 6, 2009 at 11:14 PM

The statement ' I have tested all three(3) ', was in response to a question as to whether I tested all three modes. Dbase III, Dbase IV, DotNetDbf.

I think the work you have done thus far is excellent. As a part of my testing I try to open the created dbf file, using Excel 2003 or Visual Foxpro and also Access. Currently I create Dbf files for clients from data stored in MS SQL tables. To achieve this I use Access. However as this is slow I decided to evaluate your project. My clients use either Excel, Access or Visual Foxpro to read the data we supply.

I am more than happy to assist in the development and testing as you work on the project. Where is the file header created, as this would be my first target to check?

Jul 6, 2009 at 11:23 PM

I think the header is in \Core\dbtHeader.cs. There is a nice ascii diagram in there...


Nov 10, 2009 at 7:22 PM
Edited Nov 10, 2009 at 7:24 PM

Hi folks, I can recommend trying the bak file repairing sql server file program that automatically eliminates dbf errors. It is a good solution, if you experience any difficulties with dbx files. Hope this helps