SHARE
TWEET

Untitled

a guest Jun 15th, 2019 71 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. net.ucanaccess.jdbc.UcanaccessSQLException: invalid authorization specification - not found:
  2.      
  3. final static String DBPAD = "src/Attachments/Database SOFO.mdb";
  4. final static String DB = "jdbc:ucanaccess://" +DBPAD;
  5.  
  6. public void HaalKlantNamen(){
  7.         Connection con;
  8.         Statement s;
  9.         ResultSet rs = null;
  10.         DefaultTableModel table = (DefaultTableModel) NewOrder.table.getModel();
  11.  
  12.         try {
  13.             con = DriverManager.getConnection( DB ,"","");
  14.             s = con.createStatement();
  15.             rs = s.executeQuery("select * from Item");
  16.  
  17.             if (rs != null)
  18.                 while ( rs.next() ) {
  19.                     String[] product = new String[2];
  20.                     product[0] = rs.getString("ItemSoort");                    
  21.                     product[1] = rs.getString("Naam");                    
  22.                     table.addRow(product);
  23.                 }
  24.             s.close();
  25.             con.close();
  26.         }
  27.         catch (SQLException e) {
  28.             System.out.println("Error2: " + e);
  29.         }
  30.     }
  31.      
  32. con = DriverManager.getConnection( DB , "<user>", "<password>");
  33.      
  34. con = DriverManager.getConnection( DB );
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
 
Top