从C#winform连接到DB2时的db2app.dll问题,仅在客户端计算机上 [英] db2app.dll problem when connecting to DB2 from C# winform, only on client computer

查看:805
本文介绍了从C#winform连接到DB2时的db2app.dll问题,仅在客户端计算机上的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

亲爱的所有人,



我正在c#中创建一个连接到DB2数据库服务器的winform应用程序。当然我已经在开发人员机器上安装了所有必需的db2扩展,这就是它在开发人员机器上工作的原因。


但是在我使用ClickOnce部署应用程序并开始之后在客户端机器上,我总是在客户端上收到一些错误消息。



我在visual studio中使用的IBM参考是IBM.Data.DB2(版本9.7.4.4)



错误消息:

Dear All,

I'm creating a winform app in c#, that connects to DB2 database server. Of course I have installed every required db2 extensions on the developer machine, that's why it works on the developer machine.

But after I deploying the app with ClickOnce and starting on the client machine, I always get some error message on the client.

The IBM reference I use in visual studio is IBM.Data.DB2 (version 9.7.4.4)

The error message:

System.EntryPointNotFoundException: Unable to find an entry point named 'SQLFreeConnAttribsADONET' in DLL 'db2app.dll'.





我想使用winform任何客户端计算机上的app都没有安装任何db2应用程序



我应该如何使用这个db2app.dll文件?我不能使用odbc驱动程序,因为在这种情况下我还必须在客户端计算机上设置一些参数。或者是否有其他方法可以连接到db2?



我已经尝试了在网上找到的所有建议,但没有成功。



感谢你的帮助



I would like to use the winform app on any client computer without installing any db2 applications.

how should I use this db2app.dll file? I cannot use odbc driver, because in this case I also have to set some parameters on client computer. or is there any other method that I can connect to db2 with?

I have tried all the suggestions found on web, but no success.

Thanks for your help

推荐答案

0x8007007E 错误意味着你是尝试在64位程序中加载32位DLL,反之亦然。



假设DLL是32位,请更改程序的目标平台AnyCPU到x86并重新编译。
The 0x8007007E error means you are trying to load a 32-bit DLL in a 64-bit program, or vice-versa.

Assuming the DLL is 32-bit, change your program's target platform from "AnyCPU" to "x86" and recompile.


这篇关于从C#winform连接到DB2时的db2app.dll问题,仅在客户端计算机上的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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