Phil frankel - 2021-05-31

I am having the same problem as Enshuo Hsu (2015-07-25) re: no suitable driver for an Access 2007 legacy database.
I checked my code - ok.
I followed his suggested solution by placing the 5 jar files in each of the following folders and testing the app. - the src folder, the build folder, my project folder, the JDK12 folder, the bin folder and the lib folder. Nothing changes.
I am totally lost as to what to do next.
I might add that I am new to java, but have taught programming (VB6) many years ago. I am trying to rewrite a VB6 app that is failing owing to non-support of critical controls used (eg. Hierarchial FlexGrid).
any help would be appreciated.
I am using Ucan Access 5.0
thanks
phil

below is the code - please forgive me if I am doing this incorrectly, but I couldn't see anywhere else to write it

package accessdatabase1;

import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;

/
* This program demonstrates how to use UCanAccess JDBC driver to read/write
* a Microsoft Access database.
* @author www.codejava.net

/

public class AccessDatabase1 {

public static void main(String[] args) {

    String databaseURL = "jdbc:ucanaccess://2019Rembrandt03_be.mdb";
    Connection connArt = null;

    try {
        connArt = DriverManager.getConnection(databaseURL);
        System.out.println ("Connected to MS Access database" );
        connArt.close();

    } catch (SQLException ex) {
        ex.printStackTrace(System.err);
    }
}

}

 

Last edit: Phil frankel 2021-05-31