6

私は、ローカル ネットワーク内の Access DB に接続し、一連の基本的なレポートを表示する小さな Crystal Reports Win フォーム アプリケーションを開発しました。

これにはVS 2010を使用しました。

「DAO」接続方法を使用して、VS 2010 データベース エキスパート オプションで DB にアクセスしました (はい、すべて 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) が同梱されていないということです。

任意の提案...回避策はありますか?

あなたの助けに感謝 :-)!

4

2 に答える 2

5

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.

于 2012-11-13T08:59:00.997 に答える
3

32 ビット用の CR ランタイム エンジンもインストールする必要がありました。今ではスムーズに動作しています:-)!

どうもありがとう :)!

于 2012-11-13T12:53:50.210 に答える