I'm trying to retrieve result from MS SQL Server using netbeans.
the problem is when I retrieve Arabic words from the database I receive it as ?????
.
Any one can help ?
and here is the code:
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
Connection conn = DriverManager.getConnection("jdbc:odbc:yasser");
System.out.println("test");
Statement sta = conn.createStatement();
String Sql = "select * from mainn order by id";
ResultSet rs = sta.executeQuery(Sql);
String res = null;
while (rs.next()) {
res = rs.getString("text");
System.out.println(res);
}