If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > DB2 > JDBC driver for DB2 ver 6.1 on AS/400

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 01-19-11, 00:24
rahul_krg rahul_krg is offline
Registered User
 
Join Date: Jan 2011
Posts: 2
JDBC driver for DB2 ver 6.1 on AS/400

We are trying to connect the Java application to DB2/AS400 database using JDBC code. The code is successful to establish database connection and read its version information (which is 6.1).
But while listing the catalogs on database, it gave SQLException with below error code-

SQLCODE = -805, SQLSTATE: 51002 '


which means- The package corresponding to an SQL statement execution request was not found.
(ref: http://publib.boulder.ibm.com/infoce...%2Frzalaco.htm)

The output of JDBC code is as below:

>java -cp "C:\db2 jdbc\ db2jcc.jar; C:\db2 jdbc\db2jcc_license_cisuz.jar;." DB2Connect

Connection Successful!
Driver Information
Driver Name: IBM DB2 JDBC Universal Driver Architecture
Driver Version: 2.8.46

Database Information
Database Name: AS
Database Version: V06R01M00
Avalilable Catalogs
com.ibm.db2.jcc.a.SqlException: DB2 SQL error: SQLCODE: -805, SQLSTATE: 51002 , SQLERRMC: NULLID.SYSSTAT;00;C101ED8D
at com.ibm.db2.jcc.a.rf.d(rf.java:1396)
at com.ibm.db2.jcc.b.jb.l(jb.java:356)
at com.ibm.db2.jcc.b.jb.e(jb.java:92)
at com.ibm.db2.jcc.b.w.e(w.java:72)
at com.ibm.db2.jcc.b.cc.i(cc.java:202)
at com.ibm.db2.jcc.a.rf.q(rf.java:1363)
at com.ibm.db2.jcc.a.sf.d(sf.java:2350)
at com.ibm.db2.jcc.a.tf.X(tf.java:188)
at com.ibm.db2.jcc.a.t.a(t.java:7199)
at com.ibm.db2.jcc.a.t.Xd(t.java:5884)
at com.ibm.db2.jcc.a.t.getCatalogs(t.java:5809)
at DB2Connect.displayDbProperties(DB2Connect.java:51)
at DB2Connect.main(DB2Connect.java:77)


This might be due to incompatible driver version since we are using jdbc drivers for DB2 ver 8 and source database version is 6.1. Can anyone please confirm this?
If yes, then from where we can download the JDBC drivers for DB2 ver 6.1 on AS/400?
We are unable to search it from IBM site or over internet. Please suggest.



Thanks for your time.
Kind regards,
Rahul
Reply With Quote
  #2 (permalink)  
Old 01-19-11, 18:41
rahul_krg rahul_krg is offline
Registered User
 
Join Date: Jan 2011
Posts: 2
jt400-6.6.jar solved the issue

Hi All,

The use of "jt400-6.6.jar" for DB2 ver6 on As/400 resolved the problem.
It can be downloaded from below link-
jt400-6.6.jar - JAR Search - findJAR.com

Cheers!
Rahul
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On