public void searchBook(int temp) { try { query = "SELECT * FROM ccItems WHERE ISBN = '"+temp+"'"; rs = stmt.executeQuery(query); rs.next(); this.setIsbn(rs.getString(1)); this.setTitle(rs.getString(2)); this.setAuthor(rs.getString(3)); this.setSubject(rs.getString(4)); this.setPublisher(rs.getString(5)); this.setDate(rs.getString(6)); } catch(NumberFormatException nf) { JOptionPane.showMessageDialog(null, "Numbers Only"); } catch(Exception e) { JOptionPane.showMessageDialog(null, "Error: Could not find Data"); this.setTitle(""); this.setAuthor(""); this.setSubject(""); this.setPublisher(""); this.setDate(""); } }
help please my first catch statement wont work.