我试图在运行 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.
我在 open 方法中收到此错误.找不到解决办法.
I am getting this error in open method. Could not find a solution.
异常类型:InvalidOperationExceptionExceptionMessage:SQL1159 使用 DB2 .NET 数据提供程序初始化错误,原因代码 2,令牌 D:.................................indb2app.dll,StackTrace:在 IBM.Data.DB2.DB2ConnPool.Open(DB2Connection connection, 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:.......................indb2app.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.
将 db2app.dll 和 db2app64.dll 从 C:Program FilesIBMSQLLIBBIN 复制到应用程序的 bib 文件夹中,它工作正常.
Copied db2app.dll and db2app64.dll from C:Program FilesIBMSQLLIBBIN to bib folder of application and it worked fine.
这篇关于SQL1159 DB2 .NET 数据提供程序初始化错误,原因码 2的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!