try {
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
String url="jdbc
dbc:testDB";
Connection con=DriverManager.getConnection(url,"","");
Statement statement=con.createStatement();
String query="select * from testTable";
ResultSet result=statement.executeQuery(query);
while(result.next()){
out.println(result.getString(1));
}}catch(Exception ex){ //此行好似少了一个'}'
System.out.println(ex);
}
}