通过ibmdb2驱动程序连接derby和.net c#
本文关键字:net derby 连接 ibmdb2 驱动程序 通过 | 更新日期: 2023-09-27 18:00:50
我正试图通过IBMDB2将derby数据库与C#应用程序连接起来。
首先,我安装了IBMDataServerDriverPackage,根据下面url中给出的文档,它是
http://www.ibm.com/developerworks/data/library/techarticle/dm-0410ng/index.html.
然后我安装了IBMDataServerClient,它在"bin"目录中有这个dll,我将其添加到系统路径中。并按照文件遵循每一个步骤
但我在上出错了
{System.Data.Odbc.OdbcException (0x80131937): ERROR [08001] [IBM][CLI Driver] SQL30081N A communication error has been detected. Communication protocol being used: "TCP/IP". Communication API being used: "SOCKETS". Location where the error was detected: "xx.xx.xx.xx". Communication function detecting the error: "selectForRecvTimeout". Protocol specific error code(s): "0", "*", "*". SQLSTATE=08001
和错误堆栈跟踪作为
at System.Data.Odbc.OdbcConnection.HandleError(OdbcHandle hrHandle, RetCode retcode)
at System.Data.Odbc.OdbcConnectionHandle..ctor(OdbcConnection connection, OdbcConnectionString constr, OdbcEnvironmentHandle environmentHandle)
at System.Data.Odbc.OdbcConnectionOpen..ctor(OdbcConnection outerConnection, OdbcConnectionString connectionOptions)
at System.Data.Odbc.OdbcConnectionFactory.CreateConnection(DbConnectionOptions options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningObject)
at System.Data.ProviderBase.DbConnectionFactory.CreateNonPooledConnection(DbConnection owningConnection, DbConnectionPoolGroup poolGroup)
at System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection)
at System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory)
at System.Data.Odbc.OdbcConnection.Open()
等待您宝贵的回复和评论!!!!!!!!。
嗯,你知道你引用的DeveloperWorks文章已经有10年的历史了,对吧?那个版本的IBMADO.Net软件只能访问Derby数据库的旧版本,我相信是10.0到10.2版本。
你没有提到你要运行的是什么版本的Derby,但除非它是一个非常旧的版本,否则你将无法使用这种技术。