//----------- JDBC----------- 
try{
  Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
  Connection con = DriverManager.getConnection("jdbc:odbc:MyClass");
  Statement stmt = con.createStatement();
  ResultSet result = stmt.executeQuery("select * from Class");  while(result.next()){
     String name = result.getString("Name");
     Date  Birthday= result.getDate("Birthday");
     int phone = result.getInt("phone");   
   }
   con.close();
}catch(Exception e){
   System.out.println(e.toString());
}

解决方案 »

  1.   

    Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
      Connection con = DriverManager.getConnection("jdbc:odbc:MyClass");
      Statement stmt = con.createStatement();
      ResultSet result = stmt.executeQuery("select * from Class");  while(result.next()){
         String name = result.getString("Name");
         Date  Birthday= result.getDate("Birthday");
         int phone = result.getInt("phone");   
       }
       con.close();
    }catch(Exception e){
       System.out.println(e.toString());
    }
      

  2.   

    jdbc_odbc的方法应该算是比较简单的