OK I've a database (mdb) which contains unicode symbols... exacly islandish
letters (ie \u00f0 \u00d0 \u00de \u00fe \u00c6 \u00e6), but.... yeah, but I
have problem... when I exucute SQL query i get '?' insteed right symbols.
Nothing change if I copy/pase symbols direct to database's fields or yse
\u.... coding way... anyone can help me???? thx for help ;)
and here is my simple code:
import java.sql.*;
public class SQLTest {
public static void main(String[] args) {
try {
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
Connection conn =
DriverManager.getConnection("jdbc
bc:talk","", "");
Statement st = conn.createStatement();
ResultSet rec = st.executeQuery("SELECT word FROM test");
System.out.println("word");
while (rec.next()) {
System.out.println(rec.getString(1));
}
st.close();
} catch (ClassNotFoundException e) {
e.printStackTrace();
System.err.println("Caught Exception: " + e.getMessage());
} catch (SQLException e) {
e.printStackTrace();
System.err.println("Caught Exception: " + e.getMessage());
}
}
}
--
Serwis Usenet w portalu Gazeta.pl ->
http://www.gazeta.pl/usenet/