java - How do I connect to the database MS Access? -


i have maven project , trying create connection ms access db. problem not open.

i not receive type of error, program remains active without returning connection. tried stay on hold 2 hours nothing. databaseproduction wellsys linked prodwheeltablemastersys , 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 result in console is:

connecting 

my db ms access properties:

console.bat output:

saved query in access:

i have tried changing "" in '' not understand because gives me same error. mistake found was:

error message was: unexpected token: , required: ) 

it looks reported 2 different issues:

  • the first 1 "the program remains active without returning connection" seeing app test, doesn't seem due ucanaccess... did set openexclusive=true?

Comments

Popular posts from this blog

routing - AngularJS State management ->load multiple states in one page -

python - GRASS parser() error -

json - Gson().fromJson(jsonResult, Myobject.class) return values in 0's -