从代码访问DB2时出现问题 [英] Issue while accessing DB2 from code

查看:138
本文介绍了从代码访问DB2时出现问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图通过ASP.NET代码访问DB2数据库,但面临以下问题,



引用:

SQL1159 DB2 .NET数据提供程序的初始化错误,原因码2,令牌C:\Program Files \IBM \ SQLLIB \bin\db2app.dll,





DB2安装在以下位置

Quote:

C:\Program Files (86)\IBM\SQLLIB





所以现在问题是我的应用程序没有从Program Files(x86)文件夹中获取它总是试图从Program Files文件夹中选择。我怎么能克服这个问题,请帮帮我。



提前谢谢。

解决方案

你需要确保您的PATH指向正确的文件夹,或者您只需将 db2app.dll 复制到应用程序的bin文件夹中。



祝你好运!


卸载并安装DB2,确保它安装在Program Files文件夹而不是Program Files(x86)文件夹和应用程序将成功运行,没有任何问题。


I am trying to access DB2 database through ASP.NET code, but facing below issue,

Quote:

SQL1159 Initialization error with DB2 .NET Data Provider, reason code 2, tokens C:\Program Files\IBM\SQLLIB\bin\db2app.dll,



DB2 is installed in the following location

Quote:

C:\Program Files (x86)\IBM\SQLLIB

.

So now the issue is my application is not picking up from Program Files (x86) folder its always tries to pick from Program Files folder. How can I overcome this issue, please help me out.

Thanks in advance.

解决方案

You need to make sure your PATH is pointing to the correct folder, OR you just simply copy the db2app.dll to the bin folder of your application.

Good luck!


Uninstall and install DB2 make sure it gets installed in Program Files folder rather than Program Files(x86) folder and application would be running successfully without any issues.


这篇关于从代码访问DB2时出现问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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