I have configurated my SapDB server to support unicode
(set _UNICODE -> YES & DEFAULT_CODE -> UNICODE). I
tried to insert and retrieve chinese string by using
SQL Studio successfully.
However, I have a problem on using Java to retrieve
this unicode data. My program code:
try {
Class.forName ("com.sap.dbtech.jdbc.DriverSapDB");
Connection connection = DriverManager.getConnection
(url, user, password);
Statement stmt = connection.createStatement ();
ResultSet results = stmt.executeQuery ("select name
from chinese_table");
results.next ();
String result_text = results.getString(1);
System.out.println (result_text);
} catch (UnsupportedEncodingException e) {
e.printStackTrace();
}
I can't get the result as normal as in using SQL
Studio. It shows un-recognized characters. Please help
to tell me how to handle the unicode data and also how
to insert chinese characters into unicode database by
using Java.
__________________________________________________
Do You Yahoo!?
Yahoo! - Official partner of 2002 FIFA World Cup
http://fifaworldcup.yahoo.com
_______________________________________________
sapdb.general mailing list
[EMAIL PROTECTED]
http://listserv.sap.com/mailman/listinfo/sapdb.general