469,271 Members | 1,000 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,271 developers. It's quick & easy.

as400 driver

Hi.

Does the com.ibm.as400.access.AS400JDBCDriver driver that is part of
JTOpen (http://jt400.sourceforge.net) works with db2 udb version 7 that
is installed on windows 2000?
I' m trying to access db2 from java aplication like this:

Class.forName("com.ibm.as400.access.AS400JDBCDrive r");
Connection connection =
DriverManager.getConnection("jdbc:as400://hostname","user","password");
Statement statement = connection.createStatement();
ResultSet resultSet = statement.executeQuery("select * from
tablename");

, and I get this
java.sql.SQLException: The application requester cannot establish the
connection. (Connection refused: connect)
at
com.ibm.as400.access.JDError.throwSQLException(JDE rror.java:521)
at
com.ibm.as400.access.AS400JDBCConnection.setProper ties(AS400JDBCConnection.java:2797)
at
com.ibm.as400.access.AS400JDBCDriver.prepareConnec tion(AS400JDBCDriver.java:1212)
at
com.ibm.as400.access.AS400JDBCDriver.initializeCon nection(AS400JDBCDriver.java:1103)
at
com.ibm.as400.access.AS400JDBCDriver.connect(AS400 JDBCDriver.java:355)
at java.sql.DriverManager.getConnection(Unknown
Source)
at java.sql.DriverManager.getonnection(Unknown
Source)
at test.DB2Test.main(DB2Test.java:16)

What is the problem?
DB2 is working OK because i accessed it with another driver.
Thanx,
Alan.

Nov 12 '05 #1
3 10454
alan_sec wrote:

":" + strDB_Port

6790
Does the com.ibm.as400.access.AS400JDBCDriver driver that is part of
JTOpen (http://jt400.sourceforge.net) works with db2 udb version 7 that
is installed on windows 2000?
I have no idea but this ...
java.sql.SQLException: The application requester cannot establish the
connection. (Connection refused: connect)


... sounds if your driver doesn't connect to the right port. The default
port for the DB2JD process (at least under eCS) is 6790 so
"jdbc:as400://hostname:6790" will solve your problems.

Let me hear if it helps.

Bernd

--
"Ja, alles meine Herren" sprach Fürst Lichnowsky. "Ooch det roochen?"
"Ja, auch das Rauchen." "Ooch im Tiergarten?" "Ja, auch im Tiergarten
darf geraucht werden, meine Herren." Und so endeten die Barrikadenkämpfe
des 18. März in Berlin
Nov 12 '05 #2
It doesn't help. I tryed with db2java driver that was shiped with db2
udb and it works fine, but i need to test it with as400 driver.
Thanx for repying.
Alan

Nov 12 '05 #3
alan_sec wrote:
It doesn't help. I tryed with db2java driver that was shiped with db2
udb and it works fine, but i need to test it with as400 driver.


In this case I'm out of ideas, unfortunately.

Bernd
Nov 12 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

reply views Thread by alan_sec | last post: by
4 posts views Thread by Matthew Wells | last post: by
1 post views Thread by Matthew Wells | last post: by
13 posts views Thread by Sehboo | last post: by
5 posts views Thread by Nathan Given | last post: by
1 post views Thread by accyboy1981 | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by zhoujie | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.