渔夫2011

导航

Unhandled exception type SQLException

两种解决方法,第一种:try{
   while(rs.next())    
         {  
           
          
            System.out.println("id"+rs.getString(1));  
            System.out.println("name"+rs.getString(2));  
           }  
  }catch(Exception e)
  {
   
  }
用try,catch包含
第二种:throws SQLException一下

posted on 2011-12-09 23:07  渔夫2011  阅读(616)  评论(0编辑  收藏  举报