title: How to connect UCanAccess to an Access database encrypted with a database password?
body: <p>I've developed a Java application (a dictionary) with an Access database to store the words of the dictionary and I'm getting ready to distribute it.
  I want to encrypt my database with a password to prevent people to access my words.
  When I set a passwords the Java code shows this Exception</p>
  
  <pre><code>net.ucanaccess.jdbc.UcanaccessSQLException: Decoding not supported.  Please choose a CodecProvider which supports reading the current database encoding.
  at net.ucanaccess.jdbc.UcanaccessDriver.connect(UcanaccessDriver.java:247)
  </code></pre>
  
  <p>Here is my connection code before encryption of my database with password ....</p>
  
  <pre><code>String s1="jdbc:ucanaccess://";
  String user="";
  String pass="";
  String s4="words.accdb";
  
  public void connectToDB(){
          //database connection
          try {
              conn = DriverManager.getConnection(s1+s4,user,pass);
          } catch (SQLException e) {
              e.printStackTrace();
          }
          //end of database connection
      }
  </code></pre>
  
  <p>Here is the code after the encryption with password for example 12345...</p>
  
  <pre><code>String s1="jdbc:ucanaccess://";
  String user="";
  String pass="12345";
  String s4="words.accdb";
  
  public void connectToDB(){
          //database connection
          try {
              conn = DriverManager.getConnection(s1+s4,user,pass);
          } catch (SQLException e) {
              e.printStackTrace();
          }
          //end of database connection
      }
  </code></pre>