【问题标题】:Connecting derby with .net c# through ibm db2 driver通过 ibm db2 驱动程序将 derby 与 .net c# 连接起来
【发布时间】:2013-02-26 03:41:27
【问题描述】:

我正在尝试通过 IBM DB2 将 derby 数据库与 C# 应用程序连接起来。

一开始我已经安装了 IBM Data Server Driver Package,根据以下 url 中给出的文档,它是

http://www.ibm.com/developerworks/data/library/techarticle/dm-0410ng/index.html.

然后我安装了 IBM Data Server Client,它在“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()

等待您的宝贵回复和cmets!!!!!!!!!。

【问题讨论】:

    标签: c# .net db2 derby


    【解决方案1】:

    嗯,您知道您引用的 DeveloperWorks 文章已有 10 年历史,对吧?那个版本的 IBM ADO.Net 软件只能访问非常旧的 Derby 数据库版本,我相信是 10.0 到 10.2 版本。

    您没有提及您尝试运行的 Derby 版本,但除非它是非常旧的版本,否则您将无法使用此技术。

    【讨论】:

    • 感谢您的帖子..我只是想知道是否有任何可能的方法来做到这一点..否则我们需要继续进行任何替代
    猜你喜欢
    • 2019-11-09
    • 2016-02-05
    • 1970-01-01
    • 2021-02-09
    • 1970-01-01
    • 1970-01-01
    • 2011-04-20
    • 2010-09-21
    • 1970-01-01
    相关资源
    最近更新 更多