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

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

问题描述

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

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.

为此,我使用了VS 2010.

I used VS 2010 for this.

我在VS 2010数据库专家选项中使用了"DAO"连接方法来访问数据库(是的,所有操作都在GUI中完成).在我的32位开发机和我对其进行测试的Win XP VM机上,它都可以正常工作.

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.

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

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

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

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

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

到目前为止,我已经了解到64位CR运行时引擎是随dll(crdb_dao.dll)一起提供的,该dll具有32位版本.

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?

感谢您的帮助:-)!

推荐答案

这全都是关于咬人的问题

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

It's all about bitness

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

  • 没有用于.mdb文件的标准64位驱动程序(尽管Windows默认情况下有一个32位驱动程序).

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

要能够从64位应用程序访问.mdb.accdb数据库,您必须具有64位MSOffice或Access 64位或

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.

  • 如果您使用的是.mdb Access文件,则只需显式编译32位(不是AnyCPU,因为它将尝试在64 OS中以64位启动您的应用).

  • 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).

如果使用的是.accdb Access文件,请匹配用户计算机上安装的Office/Access的位数,或者,如果Office不存在,请安装

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.

无论如何,如果您的应用程序要部署在32/64位混合环境中,则需要为每个应用程序进行显式编译,并根据

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.

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

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天全站免登陆