title: "General error Unable to open registry key Temporary (volatile) ..." from Access ODBC
body: <p>I tried the following:</p>
  
  <pre><code>private String password = "";
  private String dbName = "dataHC.accdb";
  private String bd = dbName + ";PWD=" + password;
  String  url   = "jdbc:odbc:Driver={Microsoft Access Driver (*.mdb, *.accdb)};DBQ="+bd+";";
  
  private Connection conn = null;
  
  //Connect
  public void connect() {
      try{
          Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
          conn = DriverManager.getConnection(url);
          if (conn != null)
              System.out.println("Conexión a base de datos "+dbName+". listo");
      }catch(SQLException e){
          System.out.println(e);
      }catch(ClassNotFoundException e){
          System.out.println(e);
      }
  }
  </code></pre>
  
  <p>Font: <a href="http://www.jc-mouse.net/base-de-datos/consultas-con-parametros-en-access-y-java" rel="noreferrer">http://www.jc-mouse.net/base-de-datos/consultas-con-parametros-en-access-y-java</a></p>
  
  <p>And I obtain this error:</p>
  
  <blockquote>
    <p>[Microsoft][ODBC Microsoft Access Driver]General error Unable to open registry key Temporary (volatile) Ace DSN for process 0x7f8 Thread 0x1174 DBC</p>
  </blockquote>
  
  <p>specifically</p>
  
  <pre class="lang-none prettyprint-override"><code>java.sql.SQLException: [Microsoft][ODBC Microsoft Access Driver]General error Unable to open registry key Temporary (volatile) Ace DSN for process 0x7f8 Thread 0x1174 DBC 0x8dc8d78                                                              Jet'.
  Exception in thread "main" java.lang.NullPointerException
      at depuracionDB.consultap(depuracionDB.java:67)
      at depuracionDB.main(depuracionDB.java:103)
  </code></pre>
  
  <p>I am using eclipse IDE Luna and Java version "1.7.0_45" (64 bits)</p>