try {
pt=conn.prepareStatement("select * from products");
rs=pt.executeQuery();
products=new ArrayList();
while(rs.next()){
product=new ProductsBean(rs.getInt(1),rs.getString(2),rs.getFloat(3),rs.getInt(4));
products.add(product);
}
} catch (SQLException e) {
// TODO Auto-generated catch block
e.printStackTrace();