日期:2014-05-17 浏览次数:20648 次
public BasicInf getBasicInf(String staId){ BasicInf BasicInf=null; try{ ps = connection.prepareStatement("select * from BasicInf where staId=?"); ps.setString(1,staId); ResultSet rs = ps.executeQuery(); while (rs.next()) { System.out.println(rs.getString(1)); System.out.println(rs.getString(2)); System.out.println(rs.getString(3)); System.out.println(rs.getString(4)); BasicInf.setStaId(rs.getString(1)); BasicInf.setBirthday(rs.getString(2)); BasicInf.setNation(rs.getString(4)); BasicInf.setSex(rs.getString(3)); return BasicInf; } }catch(Exception e) { e.printStackTrace(); } return BasicInf; }