public Pet getPet() {
		
		Statement state = DBConnection.OpenConnection();

		String commandstring = "SELECT * FROM Pets WHERE ID = '" + this.nPetID + "';"; 

		Pet pet = null;

		if(state != null){
			try {
				ResultSet rs = state.executeQuery(commandstring);
				rs.next();

				String PetTypeString = rs.getString("Type");
				Pet.Type PetType;
				if(PetTypeString.compareTo("dog") == 0)
					PetType = Pet.Type.dog;
				else
					PetType = Pet.Type.cat;

				String Name = rs.getString("Name");
				String OwnerName = "";		
				String PetSexString = rs.getString("Sex");
				Pet.Sex PetSex;
				if(PetSexString.compareTo("male") == 0)
					PetSex = Pet.Sex.male;
				else
					PetSex = Pet.Sex.female;

				String PetSizeString = rs.getString("Size");
				Pet.Size PetSize;
				if(PetSizeString.compareTo("small") == 0)
					PetSize = Pet.Size.small;
				else if(PetSizeString.compareTo("medium") == 0)
					PetSize = Pet.Size.medium;
				else
					PetSize = Pet.Size.large;

				String Color = rs.getString("Color");
				java.sql.Date DbDate = rs.getDate("DOB");
				Date DateOfBirth = new Date(DbDate.getTime());

				String Prescriptions = rs.getString("Prescriptions");
				Double Weight = rs.getDouble("Weight");
				String Breed = rs.getString("Breed");
				String Notes = rs.getString("Notes");

				pet = new Pet(PetType, Name, OwnerName, PetSex, PetSize, Color, DateOfBirth, Prescriptions, Weight, Breed, Notes);

				state.close();

			} catch (SQLException e) {
				System.out.println(e.getMessage());
				System.out.println("Error: Appointment.java - getPet()");

			}
		}
		else
			System.err.println("Error: Appointment.java - getPet()");
		
		return pet;

	} // end of function getPet()