• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

JDBC ODBC driver with chinese character

 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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

code:
--------------------------------------------------------------------------------
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
Regards
Sumona
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic