I was trying to connect to an access database using jdbc and swings. However, I could not find any MS Access Database driver (*.mdb) in the ODBC Data Source Control panel. The only one available is that of SQL Server. After reading a bit into it, I guess it happened because my OS was 64 bit and my MS Access was 32 bit.
Then, I went to Windows/sysWOW64/odbcad32.exe
There, I could find the Microsoft Access Database Driver. I made the appropriate connection to the database, with the name 'avi' and ran it again.
I got this error
java.sql.SQLException: [Microsoft][ODBC Driver Manager] The specified DSN contains an architecture mismatch between the Driver and Application
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)
at Conn.updt(Conn.java:25)
Conn.java lines 24 and 25:
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
Connection con = DriverManager.getConnection("jdbc:odbc:avi");
I still think its a 32-64 bit problem, but is there any turnaround? Something that would not require a lot of expertise since I'm not much familiar with this.