SQL1159 DB2 .NET 数据提供程序初始化错误,原因码 2

SQL1159 Initialization error with DB2 .NET Data Provider, reason code 2(SQL1159 DB2 .NET 数据提供程序初始化错误,原因码 2)
本文介绍了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.

我在 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的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!

本站部分内容来源互联网,如果有图片或者内容侵犯您的权益请联系我们删除!

相关文档推荐

DispatcherQueue null when trying to update Ui property in ViewModel(尝试更新ViewModel中的Ui属性时DispatcherQueue为空)
Drawing over all windows on multiple monitors(在多个监视器上绘制所有窗口)
Programmatically show the desktop(以编程方式显示桌面)
c# Generic Setlt;Tgt; implementation to access objects by type(按类型访问对象的C#泛型集实现)
InvalidOperationException When using Context Injection in ASP.Net Core(在ASP.NET核心中使用上下文注入时发生InvalidOperationException)
LINQ many-to-many relationship, how to write a correct WHERE clause?(LINQ多对多关系,如何写一个正确的WHERE子句?)