title: 64 bit java read write *dbf
body: <p>Heya all,</p>
  
  <p>I am having some issues and maybe someone has an answer for me!</p>
  
  <p>I am trying to read write some *DBF table from a java application. I have found this code :</p>
  
  <pre><code>try
          {
              Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
              String connString="jdbc:odbc:Driver={Microsoft dBASE Driver *.dbf)};DefaultDir=C:\\test";//DefaultDir indicates the location of the db
              Connection connection=DriverManager.getConnection(connString);
              String sql="SELECT * FROM table_name where condition";// usual sql query
              Statement stmt=connection.createStatement();
              ResultSet resultSet=stmt.executeQuery(sql);
              while(resultSet.next())
              {
                  System.out.println();
              }
              System.out.println();
          }
          catch (ClassNotFoundException e)
          {
              e.printStackTrace();
          }
          catch (SQLException e)
          {
              e.printStackTrace();
          }
  </code></pre>
  
  <p>This code is working fine with a 32-bit version of windows but when I try on 64 bit, it gives me the error :</p>
  
  <p>[Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified</p>
  
  <p>I have looked it up and the best answer found was about something to do with playing with the DNs in system32 or sysWOW64 but I wasent able to get threw it or my understanding was no good enough....</p>
  
  <p>Here is the link with that answer:</p>
  
  <p><a href="https://stackoverflow.com/questions/8895823/the-specified-dsn-contains-an-architecture-mismatch-between-the-driver-and-appli/12537390#12537390">SO answer that I found</a></p>
  
  <p>thanks in advance...</p>