仍是数据库的问题
请问我下面的程序问题出在哪呢?text里没有显示啊
try{
String DBurl="jdbc:odbc:rule";
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
Connection con=DriverManager.getConnection(DBurl,"sa","sa");
Statement stmt=con.createStatement();
ResultSet result=stmt.executeQuery("Select name from action where id='学校'");
String rs=result.getString("name");
text.setText("rs");
result.close();
stmt.close();
con.close();
}
catch(SQLException ex) {}
catch(java.lang.Exception ex) {}