public void updateVisitingHours(VisingHoursBean bean){

		ResultSet rs=null;
		Connection con=null;
		PreparedStatement ps=null;
		try{
			String sql="UPDATE OFFICE_HOURS SET p_id=?, weekday=?, timings=? WHERE office_hour_id=?";
			con=ConnectionPool.getConnectionFromPool();;
			ps=con.prepareStatement(sql);
			ps.setInt(1, bean.getProfessorId());
			ps.setString(2, bean.getDay());
			ps.setString(3,bean.getTime());
			ps.setInt(4, bean.getVistingHourId());
			ps.execute();
		}
		catch(Exception ex)
		{
			ex.printStackTrace();
		}
		finally{
			if(rs!=null)
			{
				try {
					rs.close();
				} catch (SQLException e) {
					e.printStackTrace();
				}
			}
			if(ps!=null)
			{
				try {
					ps.close();
				} catch (SQLException e) {
					e.printStackTrace();
				}
			}
			if(con!=null)
			{
				try {
					ConnectionPool.addConnectionBackToPool(con);;
				} catch (Exception e) {
					e.printStackTrace();
				}
			}
		}

	}