473,386 Members | 1,652 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Property for setting codepage or codeset in JDBC

I need to connect to the db (created with "IBM-943" codeset) on DB2 AIX . I am having a problem retrieving data with japanese character in 'where' clause something like this.

SELECT * FROM \"TEST\".\"TABLE1\" WHERE COL2 like '%㈱%'

It returns nothing. So I want to try to set the codepage(the same code page that db uses) in JDBC level to see if it retrieves something.

Here is what I am trying. But I am not sure if I am using valid properties.
String driver = "com.ibm.db2.jcc.DB2Driver";
String url = "....";
String username = "demouser";
String password = "demouser";
java.util.Properties prop = new java.util.Properties();
prop.put("user", username);
prop.put("password", password);
prop.put("DB2e_ENCODING", "IBM-943");
prop.put("codepage", "943");

Class.forName(driver);
com.ibm.db2.jcc.DB2Connection conn = (DB2Connection)DriverManager.getConnection(url, prop);

Does anybody know what the correct properties name is?

Thanks.
Sep 12 '08 #1
0 2843

Sign in to post your reply or Sign up for a free account.

Similar topics

9
by: Nuff Said | last post by:
When I type the following code in the interactive python shell, I get 'UTF-8'; but if I put the code into a Python script and run the script - in the same terminal on my Linux box in which I...
10
by: Christopher H. Laco | last post by:
Long story longer. I need to get web user input into a backend system that a) only grocks single byte encoding, b) expectes the data transer to be 1 bytes = 1 character, and c) uses the HP Roman-6...
4
by: Ashwin Kutty | last post by:
Hi all, I sent this message to the jdbc list and received no response there and so am posting to this list hoping I could get some help here. Thanks in advance. ---------- Forwarded message...
4
by: Phil Campaigne | last post by:
Hello, I originally installed postgresql as root user and now I am setting up a development environment with cvs and a java ide and tomcat. I have everything with the exception of postgresql...
0
by: Guido/RM/ITALY | last post by:
Hi ! i need configure codepage for DB2 Connect. i have this environment: - DB2 Server on Z/OS with codepage 500 - DB2 Connect personal Edition 8.2 on Windows 2003 - connection to DB2 via...
2
by: Vivek | last post by:
Hi, How can i determine the codepage of a database from a CLI (or embedded SQL) program ? Is there a catalog table that i can query for this information ? Thanks
1
by: rjha94 | last post by:
Hi Folks we have a java application using hibernate ORM mapper on top of db2 UDB v9. we are using type 4 jdbc drivers for connections. Now the issue is we have a table with BLOB column and ...
3
by: Frank Swarbrick | last post by:
Are there advantages to choosing, say, IBM-1252 over UTF-8? If my PC application uses code page 1252 will it perform better because no code page translation is required? I assume so. What type...
2
by: MitchellEr | last post by:
Hi, I've seen various forum posts that mention the ability to set ASPSmaryUpload's Codepage property in order to handle UTF-8 and other character encodings. Example:...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.