File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes JDBC and Relational Databases and the fly likes JDBC ODBC driver with chinese character 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 "JDBC ODBC driver with chinese character" Watch "JDBC ODBC driver with chinese character" New topic

JDBC ODBC driver with chinese character

Sumona Dev

Joined: Oct 17, 2002
Posts: 4
Hi all
I am having problems using JDBC (JDK 1.3) when I am trying to update my database (SQL Server) with certain Chinese Charaters.
I am trying to update data in a table with non-Unicode datatype (varchar) and some characters are giving problem (characters with character codes 29054, 29055, etc).
The JDBC Connection with Data base was obtained using

Properties props = new Properties();props.put("user", "sa");props.put("password", "");props.put("charSet", "Big5");try{Class test = Class.forName("jdbc dbc:amit");con = DriverManager.getConnection("sun.jdbc.odbc.JdbcOdbcDriver", props);}
But for the special characters i mentioned before it is not updating the table correctly but shows question marks (?) instread.
Well I have no problems with SQL Server Internationalization since I am able to add data (including the special characters I mentioned in my question earlier) in the SQL tables through the query analyser.
My problem basically is that I have not been able to add those special characters via my web application (JSP/Java Bean).
With regard to the problem lemme give u some more information

Unicode data types are nchar, nvarchar and ntext. Non-Unicode data types are char, varchar and text.
I am already using a Chinese Windows Machine (Win 2K Adv server) and so already have the Chinese Trational (Tiawan) Locale (zh_TW).
Now I am trying to go on with Unicode Encoding (UTF-8) but till now haven't found the solution.
If someone has some idea about using Chinese Traditional with JDBC please help. Any Help would be welcome
I agree. Here's the link:
subject: JDBC ODBC driver with chinese character
It's not a secret anymore!