title: How to connect to a 32-bit Access Database from 64-bit JVM?
body: <p>So far, when I had to connect to an 32-bit Access Database, I simply executed the application using 32-bit JVM. However, I am now developing an application that requires 64-bit JVM, but I still need to connect to an 32-bit Access Database. When I am trying connect, I get this exception: </p>
  
  <pre><code>java.sql.SQLException: [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified
  at sun.jdbc.odbc.JdbcOdbc.createSQLException(Unknown Source)
  at sun.jdbc.odbc.JdbcOdbc.standardError(Unknown Source)
  at sun.jdbc.odbc.JdbcOdbc.SQLDriverConnect(Unknown Source)
  at sun.jdbc.odbc.JdbcOdbcConnection.initialize(Unknown Source)
  at sun.jdbc.odbc.JdbcOdbcDriver.connect(Unknown Source)
  at java.sql.DriverManager.getConnection(Unknown Source)
  at java.sql.DriverManager.getConnection(Unknown Source)
  </code></pre>
  
  <p>This is my code: </p>
  
  <pre><code>String s = "jdbc:odbc:Driver={Microsoft Access Driver (*.mdb)};DBQ=" + path;
  Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
  conn = DriverManager.getConnection(s, user, password);
  </code></pre>