bj_lwt2000
发贴: 7
积分: 0
|
于 2005-05-18 14:46
package temp; import db.*; import java.sql.*; import java.util.*;
/** * @author Administrator * * TODO To change the template for this generated type comment go to * Window - Preferences - Java - Code Style - Code Templates */ public class List { private ArrayList info; List() throws Exception{ Connection con=null; PreparedStatement prepStmt=null; ResultSet rs=null; info=new ArrayList(); try{ con=Voddb.getConnection(); /////这里发生错误!!!!!!! String selectStatement="select *" + "from info"; prepStmt=con.prepareStatement( selectStatement); rs=prepStmt.executeQuery(); while(rs.next()){ Getlist bd=new Getlist(rs.getString(1),rs.getString(2),rs.getInt(3),rs.getString(4)); info.add(bd); } }catch(Exception e){ e.printStackTrace() ; } } }
|