java - "Invalid authorization specification" error on UCanAccess connect -


i having problem ucanaccess driver namely when attempt connect database using following code

public static void main(string[] args) {     //establish connection database in order execute sql queries     try {         conn = drivermanager.getconnection("jdbc:ucanaccess://h:\\it_pat_program_localonly\\it_pat_database.accdb;showschema=true");         system.out.println("connection established");     } catch (sqlexception ex) {         system.out.println("could not connect database\n"+ex);     }     //closes database connection @ program shutdown     runtime.getruntime().addshutdownhook(new thread() {         public void run() {             try {                 conn.close();                 system.out.println("shutdown succesful");             } catch (sqlexception ex) {                 system.out.println("an exception occured\n"+ex);             }         }     }); } 

i met following error:

could not connect database net.ucanaccess.jdbc.ucanaccesssqlexception: ucaexc:::3.0.0 invalid authorization specification - not found: admin 

the database connected persistence unit since i'm unaware of way make use of within code (google has been no help) method seems option.

we can not see doing authorization in code.

  • user ?
  • password ?

class.forname("net.ucanaccess.jdbc.ucanaccessdriver"); connection conn=drivermanager.getconnection(                                 "jdbc:ucanaccess://<mdb or accdb file path>",user, password); 

Comments

Popular posts from this blog

html - Firefox flex bug applied to buttons? -

html - Missing border-right in select on Firefox -

c# - two queries in same method -