我的数据库包含俄语和拉脱维亚语,当我尝试用 sql 填充我的表时,我得到 ???? 在某些领域,我可以理解该程序不理解这些语言,所以我的问题是如何解决它?数据库来自 Microsoft Excel
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
String filename = NamePath.getAbsolutePath();
String database = "jdbc:odbc:Driver={Microsoft Excel Driver (*.xls)};DBQ=";
database+= filename.trim() + ";DriverID=22;READONLY=true}";
Connection con = DriverManager.getConnection( database ,"","");
Statement s = con.createStatement();
String sql ="SELECT [Course full name],Course,Action,Time FROM [Sheet1$] order by [Course full name]";//
s.executeQuery (sql);
ResultSet rs = s.executeQuery( sql );
jTable1.setModel(DbUtils.resultSetToTableModel(rs));