public List checkAll(){
String sql = "select * from myuser";
//ʵ��������
List users = new ArrayList();
ConnDB db = new ConnDB();
ResultSet rs = db.executeQuery(sql);//��ȡ��ѯ����
try {
while(rs.next()){
UserBean userBean = new UserBean();
userBean.setUserid(rs.getInt("sid"));
userBean.setUsername(rs.getString("sname"));
userBean.setUserage(rs.getInt("sage"));
userBean.setUsersex(rs.getByte("ssex"));
userBean.setUseremail(rs.getString("semail"));
users.add(userBean);
}
db.close();//�ر����ӣ��ͷ���Դ
} catch (SQLException e) {
e.printStackTrace();
}
return users;
}