views:

267

answers:

2

Hey all, really bashing my head against a keyboard here, any information or pointing in the right direction would be fantastic.

I have a set of .DBF files with .MDX indexes. They're supposed to be dBASE version 7, but the Borland BDE only connects to 5.0 reliably from what I've found.

I can get connected using the IV and 5.0 connection string as follows:

Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\IDS\PowerSell\MyData\;Extended Properties=dBASE 5.0;

The schema I get is off from what the actual schema of the table is, and I have to run awkward chopped up queries, the results of just come of the problems I'm getting:

  1. select just fine on most columns but some columns don't work
  2. insert if I leave on some columns otherwise I get errors
  3. update if I don't provide a where clause

Does anyone have any insight into connecting and using DBF files with an MDX index and .NET? Most likely dBASE 7 files?

Thanks,

+2  A: 

Have you tried a System.Data.Odbc driver (not OldeDb) ?

All in all, be careful. I remember 1 product (BDE or ODBC) retracting support for FoxPro database, saying "updating is not certified" or something. All in all, those 'newer' DBF formats usually bring no joy, just incompatibilities. You may want to investigate what version/level ODBC drivers you've got versus what you need.

If you can, export the data and run to another format.

Henk Holterman
I completely agree. Things started to fall apart for Borland after FoxPro came around (they seemed to care less about dBase thereafter). Unless it's required for a legacy system, getting it out of an "old" format is the way to go.
Michael Todd
These arn't FoxPro databases though, which is the weird thing. What little information I've gotten from the supplier is that it's dBASE 7 Interbase, after researching though, Interbase seems to use .ibr or something similar. I'm completely perplexed as everywhere else they use Firebird.I am using oledb as well, not using the dated ODBC drivers, though I have tried them to the same results. Sadly, I'm just trying to run a conversion process to this new "system" we're using for our salesmen, I can't put the data in a new format, though that would be ideal. Moving our old format -> new format.
thismat
Interbase/Firebird is a regulat Client/Server Db, nothing to do with DBF. And FoxPro/dBase 7, it's all xBase and smells the same.
Henk Holterman
That's what I've figured, this is going to be some ugly hacked together solution, I'm not looking forward to it. I wonder if I'd have better success trying to get the free dBASE 6 libraries...worth a shot I guess. The only reason I mentioned Firebird/Interbase is that's what I was told by the supplier of the product (programmers, none the less), oh well.
thismat
Turns out we went to the vendor and they were willing to implement a import for the files I generate in CSV. No reliable way to access dBASE 6+ files in .NET, how dissapointing. Thanks for the help.
thismat
A: 

The Advantage Database (ADS/Advantage database Server) from Sybase is supposed to work well with Foxpro and earlier dBase files and is a currently supported product marketted as an ideal replacement for the BDE (Borland Database Engine), check out www.sybase.com/advantage

andora