This week's book giveaway is in the Server-Side JavaScript and NodeJS forum.
We're giving away four copies of Modern JavaScript for the Impatient and have Cay Horstmann on-line!
See this thread for details.
Win a copy of Modern JavaScript for the Impatient this week in the Server-Side JavaScript and NodeJS forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

JDBC - DB2 Native Driver - CCSID Problem

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,

I'm trying to connect to a DB2 database using the db2_classes.jar (DB2 native driver) and I'm having CSSID problems.
I looked at all the posts about it but I couldn't find any solution.


Here's code
private AS400 server = null;
...
server = new AS400(IP_ADDRESS);
server.setUserId(USER_ID);
server.setPassword(PASSWORD);
Driver driver = (Driver) Class.forName("com.ibm.db2.jdbc.app.DB2Driver").newInstance();


Here is the error message
Error setting driver and connection using JDBC native driver. The error message is as follows: CCSID value is not valid.


When I'm looking at the server.getCcsid() returned value I've got 297.
In my AS400 user profile (chgusrfprf), the CCSID is initialized to *SYSVAL. It looks ok for me

I managed to connect to this DB2 database with the com.ibm.as400.access.AS400JDBCDriver

Does someone have a clue of what's going on?
 
If I had asked people what they wanted, they would have said faster horses - Ford. Tiny ad:
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
    Bookmark Topic Watch Topic
  • New Topic