Fog Creek Software
Discussion Board

Welcome! and rules

Joel on Software

ADO.NET and DBF files

I just started a new contract yesterday and already ran into a bit of a roadblock. The current specs specify that the DBF files stay in DBase IV format, so that Excel can read the output files.

In the past I've just used the ISAM drivers from JET 4. Our current setup is Windows 2003 Server, which is refusing to downgrade the MDAC lower than 2.7. I read that JET SP6 is the last service pack to contain these drivers. We have been using the VFPOLEDB driver, but it converts the files to newer formats, whenever any manipulation of the files is done.

I spent a whole afternoon doing searches on Google, but nothing showed up about keeping the data format to DBase IV. Anybody know how to do this?

Thanks in Advance!

Tuesday, March 09, 2004

Can I ask why you can't fulfill the requirement by just outputting data to Excel files through Automation (or several other such possibilities)?

Tuesday, March 09, 2004

Accoridng to you have a choice of ODBC and OLEDB:

  "Driver={Microsoft dBASE Driver (*.dbf)};DriverID=277;Dbq=c:\mydbpath;"

OLE DB, OleDbConnection (.NET)
  "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=c:\folder;Extended Properties=dBASE IV;User ID=Admin;Password="

re. the ODBC - looking at our Win 2003 server it has "Microsoft dBASE Driver (*.dbf)" installed (Admin Tools > Data Sources (ODBC)).

Duncan Smart
Tuesday, March 09, 2004


No can do, because we need to manipulate the DBF file (add columns) and return the updated DBF to the originator.


Thanks, but I've already tried those. Same "No ISAM drivers" problem.

I found a workaround, where I just change the actual header of the DBF. It works great. I change the first byte to 0x43 and that makes it a dBASE IV file. Then I overwrite any extraneous header info with 0x00. Voila! it works :)

Tuesday, March 09, 2004

*  Recent Topics

*  Fog Creek Home