I need to connect to a .accdb file with java. Inside of this file, there are some sharepoint lists I need to research.
I am using Spring Boot and UCanAccess to make the connection into the .accdb.
<dependency>
<groupId>net.sf.ucanaccess</groupId>
<artifactId>ucanaccess</artifactId>
<version>5.0.1</version>
</dependency>
It doesn't seem to be any problem on the following code, because it enters on the if...
conn = DriverManager.getConnection("jdbc:ucanaccess://SHAREPOINT_COMUN.accdb;memory=false", user, password);
if (conn != null) {
log.info("URL de conexión: " + conn.getMetaData().getURL());
conn.close();
} else {
log.error("No se ha conectado a la base de datos.");
}
But, when I try to look into any of the lists with:
stmt = conn.createStatement();
rs = stmt.executeQuery("SELECT * FROM <table_name>");
while (rs.next()) {
String tableName = rs.getString("Name");
log.info("Tabla: " + tableName);
}
It throws me the following exception:
net.ucanaccess.jdbc.UcanaccessSQLException: UCAExc:::5.0.1 user does not have sufficient privileges or object not found: <table_name>
I have enough privileges because with Access I am able to see it.
Thank you in advance.