SQL1159 DB2 .NET数据提供程序初始化错误,原因码2 [英] SQL1159 Initialization error with DB2 .NET Data Provider, reason code 2

查看:79
本文介绍了SQL1159 DB2 .NET数据提供程序初始化错误,原因码2的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图在运行Windows 7 64位的开发机中从.NET 2.0应用程序连接到DB2。

I am trying to connect to DB2 from .NET 2.0 application in my development machine running windows 7 64 bit.

我在打开方法中遇到此错误。

I am getting this error in open method. Could not find a solution.

ExceptionType:InvalidOperationException
ExceptionMessage:SQL1159 DB2 .NET数据提供程序初始化错误,原因码2,令牌D:... ........... \bin\db2app.dll,
StackTrace:在IBM.Data.DB2.DB2ConnPool.Open(DB2Connection连接,String& ; szConnectionString,DB2ConnSettings& ppSettings,Object& ppConn)
在IBM.Data.DB2.DB2Connection.Open()

ExceptionType: InvalidOperationException ExceptionMessage: SQL1159 Initialization error with DB2 .NET Data Provider, reason code 2, tokens D:.......................\bin\db2app.dll, StackTrace: at IBM.Data.DB2.DB2ConnPool.Open(DB2Connection connection, String& szConnectionString, DB2ConnSettings& ppSettings, Object& ppConn) at IBM.Data.DB2.DB2Connection.Open()

推荐答案

从我的同事那里学到了这一点。问题是因为应用程序文件夹的bin目录中缺少db2app.dll。

Learnt this from a colleauge of mine. Issue was because db2app.dll was missing in bin directory of application folder.

从C:\Program Files\IBM\复制了db2app.dll和db2app64.dll。 SQLLIB\BIN到应用程序的bib文件夹中,并且工作正常。

Copied db2app.dll and db2app64.dll from C:\Program Files\IBM\SQLLIB\BIN to bib folder of application and it worked fine.

这篇关于SQL1159 DB2 .NET数据提供程序初始化错误,原因码2的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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