SHARE
TWEET

Untitled

a guest Oct 21st, 2019 63 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.     public String GetPatient() {
  2.         Preferences pref;
  3.         pref = Preferences.userNodeForPackage(Database.class);
  4.         String sIDzoek = pref.get("Patiënt_ID", "");
  5.         String sresult = null;
  6.         try {
  7.             Statement stmt = this.conn.createStatement();
  8.             ResultSet rs;
  9.             if (stmt.execute("SELECT * FROM patient Where Patiënt_ID  ='" + sIDzoek + "'")) {
  10.                 rs = stmt.getResultSet();
  11.                 while (rs.next()) {
  12.                     sresult = rs.getString("naam");
  13.                 }
  14.             }
  15.             return sresult;
  16.         } catch (SQLException e) {
  17.             System.out.println(e);
  18.             return null;
  19.         }
  20.     }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top