C# 中的 ODBC .DBF 文件

发布于 2024-07-17 21:35:07 字数 394 浏览 3 评论 0原文

我在使用 .dbf 文件时遇到很多麻烦。 我有一个用 C# 编写的应用程序,它从 .DBF 文件中读取数据,然后将它们导出到另一个数据库。 我尝试过使用 Microsoft dBase 驱动程序,但它没有读取我需要的所有 .DBF 文件,这意味着我只能从五个 .DBF 文件中的两个检索数​​据,Visual Studio 告诉我其他 .DBF 文件不存在,它一直说我的输入字符串太大。 有一些 Microsoft Visual Fox Pro 驱动程序,但每次我选择其中一个驱动程序时,Visual Studio 都会告诉我它无法建立连接。 最糟糕的是,该应用程序将在我无权访问的客户端计算机上使用。 如何保留 ODBC 数据源以便我的应用程序可以在其他人的计算机上运行? 我对 .DBF 非常不熟悉,不知道哪种驱动程序最有效,并且需要有人引导我完成这些步骤。

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.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

两仪 2024-07-24 21:35:07

这些 DBF 文件是由 Foxpro 生成的吗? 如果它们是由高于 7 的 Foxpro 版本创建的,则 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.

Edit: removed spam link

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文