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

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

Post by Steph » Wed, 23 May 2001 11:40:16



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.

 
 
 

1. Urgent: DB2 code page conversion error through JDBC connect

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.

2. please remove me

3. DB2 JDBC SQL error codes ??

4. Infinite Recovery Help Needed (Online 5.0)

5. JDBC transliteration error when connecting to SQL Server - Urgent

6. j2ee -verbose problem

7. error -- code page conversion 1252 - 1251

8. Install Only SQL-DMO

9. JDBC + DB2 + Applet = "conversion error"

10. Urgent! DB2 jdbc connection error

11. Conversion from Unicode to SQL server code page

12. JDBC-connect to DB2 (CLI0615 error)

13. DB2 Newbie: Connecting to AS/400 DB2 with JDBC problems