ODBC dbf文件在C# [英] ODBC .DBF Files in C#

查看:189
本文介绍了ODBC dbf文件在C#的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在使用dbf文件了很大的麻烦。我在C#编写,从dbf文件中读取一个应用程序,然后将其出口到另一个数据库。我已经使用Microsoft dBase驱动程序尝试,但它不是阅读完所有我需要的dbf文件,也就是说我只能从五个dbf文件两种检索数据时,Visual Studio告诉我其他dbf文件不存在,它口口声声说我的输入字符串是太大。有一些的Microsoft Visual福克斯Pro驱动程序,但每次我选择其中之一时,Visual Studio是告诉我它无法建立连接。最糟糕的是,这种应用将在我不访问客户机使用。如何保持ODBC数据源,以便我的应用程序将在其他人的机器工作?我很熟悉.DBFs,不知道是什么驱动程序工作最好的,需要有人走我走过的步骤。

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.

推荐答案

由Foxpro中,或许这些生产DBF文件?如果他们被一个版本的FoxPro大于7的创建HTEN ODBC驱动程序将不会反正阅读。在这种情况下,使用 OLE -DB司机代替 - 这可能与你的工作文件,不论其来源,值得一试为使用OLE-DB会从ODBC数据源客场惨败

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.

有一些示例代码(VB不幸)这里

There's some sample code (VB unfortunately) here.

这篇关于ODBC dbf文件在C#的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆