public static int isbnbook(int tempisbn, int intisbn) throws NamingException, SQLException {
		Connection conn = null;
		Statement stmt = null;
		ResultSet rs = null;

		DataSource ds = getDataSource();

		try {
			conn = ds.getConnection();
			stmt = conn
					.createStatement();

			rs = stmt.executeQuery("SELECT isbn FROM books WHERE isbn like '" + tempisbn + "%'");

			while (rs.next()) {
				if(intisbn != rs.getInt(1)){
					intisbn++;
				}else{
				}
			}
		} finally {
			if (rs != null)
				try {
					rs.close();
				} catch (SQLException e) {
				}
			if (stmt != null)
				try {
					stmt.close();
				} catch (SQLException e) {
				}
			if (conn != null)
				try {
					conn.close();
				} catch (SQLException e) {
				}
		}
		intisbn++;
		return intisbn;
	}