It's not a secret anymore!
The moose likes JDBC and Relational Databases and the fly likes quick question on DB2 JDBC encoding Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC and Relational Databases
Bookmark "quick question on DB2 JDBC encoding" Watch "quick question on DB2 JDBC encoding" New topic
Author

quick question on DB2 JDBC encoding

Kishore Dandu
Ranch Hand

Joined: Jul 10, 2001
Posts: 1934
I am using a JDBC type4 driver from IBM for DB2, connecting to DB2 on the mainframe.

I am having issues with encoding and i believe it has to do with telling the driver to use specific encoding. Let me know if any one has some idea how to set this property to the driver.


Kishore
SCJP, blog
Scott Selikoff
author
Saloon Keeper

Joined: Oct 23, 2005
Posts: 3749
    
  10

I assume the issue for encoding is when you work with String objects, correct? You could use streams to set/read the read data such as getCharacterStream() method.


[OCA 8 Book] [Blog]
Kishore Dandu
Ranch Hand

Joined: Jul 10, 2001
Posts: 1934
I started using Eclipse provided JVM and it started working like a charm. I am not understanding the logic behind that.
Scott Selikoff
author
Saloon Keeper

Joined: Oct 23, 2005
Posts: 3749
    
  10

Encoding can be set as a JVM argument so its likely Eclipse is doing something different than how you were running it before.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: quick question on DB2 JDBC encoding
 
It's not a secret anymore!