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

7

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

The End

相关推荐

C# 中的多播委托奇怪行为?
Multicast delegate weird behavior in C#?(C# 中的多播委托奇怪行为?)...
2023-11-11 C#/.NET开发问题
6

参数计数与调用不匹配?
Parameter count mismatch with Invoke?(参数计数与调用不匹配?)...
2023-11-11 C#/.NET开发问题
26

如何将代表存储在列表中
How to store delegates in a List(如何将代表存储在列表中)...
2023-11-11 C#/.NET开发问题
6

代表如何工作(在后台)?
How delegates work (in the background)?(代表如何工作(在后台)?)...
2023-11-11 C#/.NET开发问题
5

没有 EndInvoke 的 C# 异步调用?
C# Asynchronous call without EndInvoke?(没有 EndInvoke 的 C# 异步调用?)...
2023-11-11 C#/.NET开发问题
2

Delegate.CreateDelegate() 和泛型:错误绑定到目标方法
Delegate.CreateDelegate() and generics: Error binding to target method(Delegate.CreateDelegate() 和泛型:错误绑定到目标方法)...
2023-11-11 C#/.NET开发问题
14