简体   繁体   English

通过ibm db2驱动程序将derby与.net c#连接

[英]Connecting derby with .net c# through ibm db2 driver

I'm trying to connect derby database with C# application through IBM DB2. 我正在尝试通过IBM DB2将derby数据库与C#应用程序连接。

At first I've installed IBM Data Server Driver Package, which, according to the documentation given in the following url as 首先,我安装了IBM Data Server Driver Package,根据以下url中给出的文档,该软件包为

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

Then I installed IBM Data Server Client, which has this dll in "bin" directory, which I added to system path. 然后,我安装了IBM Data Server Client,它在“ bin”目录中具有此dll,并将其添加到系统路径中。 and followed every steps as per that document 并按照该文档执行了所有步骤

but i am getting error as 但我得到错误

{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

and error stack trace as 和错误堆栈跟踪为

 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()

waiting for your valuable responses and comments!!!!!!!!. 等待您的宝贵回应和评论!!!!!

Uhm, you realize that the DeveloperWorks article you reference is 10 years old, right? 嗯,您意识到您引用的developerWorks文章已有10年了,对吧? That version of the IBM ADO.Net software was only able to access very old versions of the Derby database, versions 10.0 through 10.2 I believe. 那个版本的IBM ADO.Net软件只能访问非常旧的Derby数据库版本,我相信它的版本是10.0到10.2。

You don't mention what version of Derby you're trying to run, but unless it is a VERY old version you're not going to be able to use this technique. 您没有提到要运行的Derby版本,但是除非它是非常旧的版本,否则您将无法使用此技术。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM