I have a Maven Project and I am trying to create a connection to my MS Access db. The problem is that it does not open.
I do not receive any type of error, but the program remains active without returning the connection. I tried to stay on hold two hours but nothing. The databaseProduction
WellSys is linked to ProdWheelTableMasterSys
and WhellDemand
.
My code is:
package com.sealed.air.SealedAir;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;
public class App {
public static void main(String[] args) {
String conex = "jdbc:ucanaccess://";
String url = "C:/DB/ProductionWhellSys.accdb";
try {
System.out.println("Connecting");
Connection con = DriverManager.getConnection(conex+url);
System.out.println("Connected");
} catch (SQLException e) {
e.printStackTrace();
}
}
}
And the result in the console is:
Connecting
My DB MS access properties:
console.bat output:
saved query in Access:
I have tried changing the "" in '' but I do not understand because it gives me the same error. Another mistake I found was:
Error message was: unexpected token: , required: )