I am trying to connect to a MS Access database using hsqldb in java. I added all the libraries I needed, but in the end I still get an exception: Exception in thread "main" java.sql.SQLSyntaxErrorException: user lacks privilege or object not found: MESSAGES Caused by: org.hsqldb.HsqlException: user lacks privilege or object not found: MESSAGES
Code below:
Connection conn = null;
try {
Class.forName("org.hsqldb.jdbcDriver");
conn = DriverManager.getConnection("jdbc:hsqldb:D:/sms4.accdb", "sa", "");
} catch (SQLException e) {
e.printStackTrace();
} catch (ClassNotFoundException e) {
e.printStackTrace();
}
Statement s = conn.createStatement();
ResultSet rs = s.executeQuery("select * from Messages"); //here is where I get the error