我完全没有使用 AS400 DB2 的经验,所以请原谅我在学习过程中出现的任何明显错误。我有 2 个可以连接到运行v5r3或v4r3 的盒子。 我正在使用NHibernate 3。但是,当我尝试连接时,我不断收到以下异常:-
ERROR [08001] [IBM] SQL30081N A communication error has been detected.
Communication protocol being used: "TCP/IP". Communication API being used: "SOCKETS".
Location where the error was detected: "192.168.1.11". Communication function detecting the error: "connect". Protocol specific error code(s): "10061", "*", "*". SQLSTATE=08001
下面是我的 NHibernate 配置文件:-
<hibernate-configuration xmlns="urn:nhibernate-configuration-2.2">
<session-factory>
<property name="connection.provider">NHibernate.Connection.DriverConnectionProvider</property>
<property name="dialect">NHibernate.Dialect.DB2400Dialect</property>
<property name="connection.driver_class">NHibernate.Driver.DB2Driver</property>
<property name="connection.connection_string">Server=192.168.1.11;Database=TESTDB;UID=XXX;PWD=XXX; </property>
<property name="proxyfactory.factory_class">NHibernate.ByteCode.Castle.ProxyFactoryFactory, NHibernate.ByteCode.Castle</property>
<property name="command_timeout">15000</property>
<property name="current_session_context_class">thread_static</property>
</session-factory>
</hibernate-configuration>
不知道是不是因为AS400的版本太早了?我的休眠配置不正确?或者我在 AS400 本身上设置不正确。
任何建议将不胜感激。
提前谢谢了