i am trying to fill a table from a database using ucanacces but it gives me the following error and i don't understand why, upon googling this error most people mention something about a username and password but i don't see how that is relevant as i don't use a username and password throughout the application.
Error (this is the full error, i don't know why it just ends after the ':'):
net.ucanaccess.jdbc.UcanaccessSQLException: invalid authorization specification - not found:
Code:
final static String DBPAD = "src/Attachments/Database SOFO.mdb";
final static String DB = "jdbc:ucanaccess://" +DBPAD;
public void HaalKlantNamen(){
Connection con;
Statement s;
ResultSet rs = null;
DefaultTableModel table = (DefaultTableModel) NewOrder.table.getModel();
try {
con = DriverManager.getConnection( DB ,"","");
s = con.createStatement();
rs = s.executeQuery("select * from Item");
if (rs != null)
while ( rs.next() ) {
String[] product = new String[2];
product[0] = rs.getString("ItemSoort");
product[1] = rs.getString("Naam");
table.addRow(product);
}
s.close();
con.close();
}
catch (SQLException e) {
System.out.println("Error2: " + e);
}
}