I cannot connect to my access database using jdbc:ucanaccess driver. Here the code:
public void open_conn()
{
try
{
Class.forName("net.ucanaccess.jdbc.UcanaccessDriver");
String url = "jdbc:ucanaccess://C:\\AnalysisLab\\dbanal.accdb";
conn = DriverManager.getConnection(url, "username", "password");
stmt = conn.createStatement();
}
catch (Exception e)
{
JOptionPane.showMessageDialog(null,"Error: "+e.getLocalizedMessage()); e.printStackTrace();
}
}
The error reported : "Error: net.ucanaccess.jdbc.UcanaccessDriver" I tried including org-netbeans-modules-db-mysql.jar file in the jar directory, but it doesn't work.