public static void editBook(Book b){
		
		try {
			   if(conn == null || conn.isClosed()){
				    conn = DatabaseConnection.getConnection();
				   }
				  } catch (SQLException e1) {
				   // TODO Auto-generated catch block
				   e1.printStackTrace();
				  }
		
		try{
			conn.setAutoCommit(false);
			PreparedStatement stmnt = conn.prepareStatement("UPDATE Books set title = ?, author = ?, year = ?, place_of_publication = ?, publisher = ?, genre = ?, isbn = ? WHERE book_id = ?");
			
			stmnt.setString(1, b.getTitle());
			stmnt.setString(2, b.getAuthor());
			stmnt.setString(3, StringDateSwitcher.dateToStringYear(b.getYearEdition()));
			stmnt.setString(4, b.getPublicationPlace());
			stmnt.setString(5, b.getPublisher());
			stmnt.setString(6, b.getGenre());
			stmnt.setString(7, b.getISBN());
			stmnt.setInt(8,b.getBookID());
			
			stmnt.execute();
			conn.commit();
			conn.setAutoCommit(true);
		
		}catch(SQLException e){
			System.out.println("update fail!! - " + e);
		}

}