NLS characterset problem (TRADITIONAL CHINESE)
Date: 6 Apr 2002 19:54:20 -0800
Message-ID: <d1c2a2eb.0204061954.7b4cf874_at_posting.google.com>
Hello.
I'm using Oracle 8i (8.1.6) and WebSphere Application 3.5 on NT. my question is the following:
how could I correctly extract special TRADITIONAL CHINESE characters using the jdbc( JDBC Thin driver )?
I set init.ora is :
nls_language="TRADITIONAL CHINESE" nls_territory=TAIWAN nls_numeric_characters=ZHT16MSWIN950
I write program's code is:
DataSource ds = null;
Connection conn = null;
Hashtable parms = new Hashtable();
parms.put(Context.INITIAL_CONTEXT_FACTORY, CNInitialContextFactory.class.getName());
Context context = new InitialContext(parms);
ds = (DataSource) context.lookup("jdbc/ASIA");
conn = ds.getConnection("UserID","Password");
Statement st = conn.createStatement();
st.executeUpdate("INSERT INTO FSCM003(DESC) VALUES("裏")");
...........then I use other program
ResultSet rs = st.executeQuery("SELECT DESC FROM FSCM003");
rs.next();
rs.getString(1);
....................
I got the this("?") character
But When I use ODBC to access the DataBase I can get the extract special TRADITIONAL CHINESE "裏".
how do we teach this jdbc driver to convert our language-sets ?
OR
How can I do?
thanks for any help Received on Sun Apr 07 2002 - 05:54:20 CEST