Winforms Crystal Report - “加载数据库信息失败"错误 [英] Winforms Crystal Report - "Failed to load database information" error

查看:35
本文介绍了Winforms Crystal Report - “加载数据库信息失败"错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我开发了一个小型的水晶报表 Win Forms 应用程序,它连接到本地网络中的 Access DB 并显示一组基本报表.

为此我使用了 VS 2010.

我使用DAO"连接方法访问 VS 2010 数据库专家选项中的数据库(是的,全部在 GUI 中完成).它在我的 32 位开发机器和我测试过的 Win XP VM 机器上运行良好.

但是,我在 Win 7 64 位 PC 上设置了报告,但出现此错误.

这些是我在 64 位 Win 7 PC 上的安装:

  • 适用于 .NET Fx 4(64 位)的 SAP Crystal Reports 运行时引擎
  • .NET Framework 4 客户端配置文件(x86 和 x64)

到目前为止,我所读到的是 64 位 CR 运行时引擎不附带 32 位版本可用的 dll (crdb_dao.dll).

任何建议...任何解决方法?

感谢您的帮助:-)!

解决方案

一切都与比特有关

对于 Access 数据库,您必须注意应用程序的位数:

  • .mdb 文件没有标准的 64 位驱动程序(但在 Windows 中默认有一个 32 位驱动程序).

  • 要能够从 64 位应用程序访问 .mdb.accdb 数据库,您必须具有 MSOffice 64 位或 Access 64 位或 Access Database Engine 64 位驱动程序.
    如果您在该机器上安装了 MSOffice 或 Access 2007/2010/2013 32 位,您将无法安装 64 位驱动程序,您无法混合搭配 32 位和 64 位 Office 组件.

解决您的问题

  • 如果您使用 .mdb 访问文件,只需显式编译 32 位(不是 AnyCPU,因为它会尝试在 64 位操作系统中以 64 位方式启动您的应用).

  • 如果您使用 .accdb Access 文件,请匹配用户计算机上安装的 Office/Access 的位数,或者,如果 Office 不存在,请安装 访问数据库引擎 驱动程序.

  • 在任何情况下,如果您的应用程序要部署在混合的 32/64 位环境中,您将需要为每个环境明确编译并根据 访问数据库引擎 或用户计算机上安装的 MSOffice.

注意:澄清一下,如果用户机器上已经安装了MSOffice 2007/2010/2013,则无需安装Access数据库引擎.

I have developed a small crystal reports win forms application that connects to an Access DB in the local network and shows a set of basic reports.

I used VS 2010 for this.

I used the 'DAO' connectivity method to access the DB in the VS 2010 Database expert option (Yes, Its all done in the GUI). It works all fine and dandy in my 32 bit dev machine and an Win XP VM machine that i tested it on.

However, I setup the reports on a Win 7 64bit PC and I get this error.

These are the installations I made on the 64bit Win 7 PC:

  • SAP Crystal Reports runtime engine for .NET Fx 4 (64-bit)
  • .NET Framework 4 Client profile (x86 & x64)

What I have read till now is that the 64 bit CR runtime engine is ot shipped with the dll (crdb_dao.dll) which is available in 32 bit version.

Any suggestions... Any workarounds?

Appreciate your help :-)!

解决方案

It's all about bitness

With Access databases, you have to be careful about the bitness of your application:

  • There is not standard 64 bit driver for .mdb files (there is one by default in Windows for 32 bits though).

  • To be able to access .mdb and .accdb databases from a 64 bit application, you must have MSOffice 64 bit or Access 64 bit or the Access Database Engine drivers for 64 bit.
    If you have MSOffice or Access 2007/2010/2013 32 bit installed on that machine, you won't be able to install the 64 bit driver, you can't mix and match 32 bit and 64 bit Office components.

To solve your issue

  • If you are using .mdb Access files, simply compile for 32 bits explicitly (not AnyCPU since it will try to launch your app as 64 bit in a 64 OS).

  • If you are using .accdb Access files, match the bitness of Office/Access installed on the user machine, or, if Office isn't there, install the Access Database Engine driver.

  • In any case, if your application is to be deployed in mixed 32 / 64 bit environments, you will need to compile explicitly for each and install the right version according to the bitness of the Access Database Engine or MSOffice installed on the user's machine.

Note: just to clarify, if MSOffice 2007/2010/2013 is already installed on the user's machine, there is no need to install the Access Database Engine.

这篇关于Winforms Crystal Report - “加载数据库信息失败"错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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