public int checkQuantity(String recipeName, Date fromDate, Date toDate) {
		String sql = 
				"Select count(*) "+
				"from Pallets "+
				"where recipeName like ? and creationDateAndTime between ? and ? ";

		PreparedStatement ps = null;
		try {
			ps = conn.prepareStatement(sql);
			ps.setString(1, recipeName);
			ps.setDate(2, fromDate);
			ps.setDate(3, toDate);
		} catch (SQLException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		int rtn = 0;
		try {
				ResultSet rs = ps.executeQuery();
				while (rs.next()) {
					rtn = rs.getInt(1);
				}
			} catch (SQLException e1) {
				// TODO Auto-generated catch block
				e1.printStackTrace();
			} finally {
				if(ps != null)
					try {
						ps.close();
					} catch (SQLException e) {
						// TODO Auto-generated catch block
						e.printStackTrace();
					}
			}
		return rtn;
	}