title: Using UCanAccess instead of the JDBC-ODBC Bridge for working with DBF files
body: <p>I'm using NetBeans IDE 8.2 and would like to make a connection with UCanAccess to access my database files. Initially I was using <code>jdbc:odbc</code> but I found that Java 8 onward no longer supports this method</p>
  
  <p>Here is my initial coding :</p>
  
  <pre><code>Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
  con = DriverManager.getConnection("jdbc:odbc:vABCD");
  </code></pre>
  
  <p>Here is the code after the changes :</p>
  
  <pre><code> Class.forName("net.ucanaccess.jdbc.UcanaccessDriver");
  con = DriverManager.getConnection ("jdbc:ucanaccess://C:\\Users\\questionasker\\Desktop\\database");
  </code></pre>
  
  <p>but I get the error :</p>
  
  <pre><code>net.ucanaccess.jdbc.UcanaccessSQLException: UCAExc:::4.0.2 C:\Users\questionasker\Desktop\database (Access is denied)
  at net.ucanaccess.jdbc.UcanaccessDriver.connect(UcanaccessDriver.java:264)
  at java.sql.DriverManager.getConnection(DriverManager.java:664)
  at java.sql.DriverManager.getConnection(DriverManager.java:270)
  at vhrmsrptgen.AnnualAppraisal.connect(AnnualAppraisal.java:41)
  at vhrmsrptgen.AnnualAppraisal.generate(AnnualAppraisal.java:90)
  at vhrmsrptgen.MainFrame.btnGenerate_actionPerformed(MainFrame.java:368)
  at vhrmsrptgen.MainFrame_btnGenerate_actionAdapter.actionPerformed(MainFrame.java:583)
  </code></pre>
  
  <p>My database files are all in .DBF format (which are very old files) and all files are under this directory : </p>
  
  <pre><code>C:\\Users\\questionasker\\Desktop\\database
  </code></pre>
  
  <p>What can I do in order to make the coding correct to connect the database?</p>