ODBC .DBF Files in C#

2019-03-04 16:34发布

I am having a lot of trouble using .dbf files. I have an application written in C# that reads from .DBF files and then exports them to another database. I've tried using the Microsoft dBase driver but it's not reading all of the .DBF files that I need to, meaning that I can retrieve data from only two of the five .DBF files, Visual Studio is telling me the other .DBF files don't exist and it keeps saying the my input string is too large. There are some Microsoft Visual Fox Pro drivers but every time I choose one of those, Visual Studio is telling me that it couldn't make a connection. The worst part is that this application will be used on client machines that I don't have access to. How do I keep the ODBC data source so that my application will work on other peoples machine? I am very unfamiliar with .DBFs, have no idea what driver works best, and need someone to walk me through the steps.

标签: c# odbc dbf
1条回答
做自己的国王
2楼-- · 2019-03-04 16:34

Are these DBF files produced by Foxpro, perchance? If they've been created by a version of Foxpro greater than 7 hten the ODBC driver won't read them anyway. In that case, use the OLE-DB driver instead - which may work with your files whatever their source, worth a try as using OLE-DB gets away from the ODBC data source fiasco.

Edit: removed spam link

查看更多
登录 后发表回答