Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Urgent: JDBC connect to DB2, SQL Exception : code page conversion error

7 views
Skip to first unread message

Stephen

unread,
May 21, 2001, 10:40:16 PM5/21/01
to
I have installed a DB2 Workgroup edition server 7.1 in one machine
running
Windows 2000 Server and developing a java program running on a Windows
NT 4.0
machine with DB2 7.1 client installed.

The codepage for the server is set to 950 (traditional chinese big5).
And to avoid code page conversion, in the client, I use db2set to set
db2codepage to 950 also. And I found no problem for db connection
through db2 commandline (db2cmd).

However, when I use JDBC to connect (use native driver : COM.ibm.db2.j
dbc.app.DB2Driver), I get a SQL exception when using the DriverManager
.getConnection:
java.sql.SQLException: Code page conversion tables do not exist
at COM.ibm.db2.jdbc.app.DB2Connection.SQLConnect(Native Method)
at COM.ibm.db2.jdbc.app.DB2Connection.connect(DB2Connection.java,
Compiled
Code)
at COM.ibm.db2.jdbc.app.DB2Connection.<init>(DB2Connection.java:321)
at COM.ibm.db2.jdbc.app.DB2Driver.connect(DB2Driver.java:337)
at java.sql.DriverManager.getConnection(DriverManager.java:457)
at java.sql.DriverManager.getConnection(DriverManager.java:137)
at testDB.main(testDB.java:13)
Exception in thread "main"


It seems that the db2 jdbc driver does not read the db2set environment
variables...

I am sure the necessary classpath is set (like db2java.zip and
runtime.zip are
included).

How can I let DB2 know the client is also with codepage = 950 through
JDBC (since I don't want code page conversion. )

regards.

Stephen.

0 new messages