Today, there is a problem, although not a big problem, but for beginners also entangled me for a long time! (well)
Problem:
Running the JSP project does not connect to the database:
Java.sql.SQLException: [MICROSOFT][ODBC Driver Manager] in the specified DSN, the architecture between the driver and the application does not match.
I am using JDBC-ODBC Bridge connection Access database, this problem, it is definitely a database connection problem, so I all kinds of Baidu, but said the feeling is not too good!
Workaround:
1. First my computer is a 64-bit operating system, JDK 1.7 (64-bit), Tonacat 7.0 (64-bit)
2. Control Panel-management tools
There are 2 ODBC data sources, because my computer is a 64-bit operating system, JDK 1.7 (64-bit), Tonacat 7.0 (64-bit), so you should choose 64-bit.
3. Then "System DSN", click "Add" button, results only the following several drivers
4. Do not panic, you should download a connection to the Access database driver (64-bit), attached: http://download.microsoft.com/download/E/4/2/ E4220252-5fae-4f0a-b1b9-0b48b5fbccf9/accessdatabaseengine_x64.exe
The installation is good!
5. Finally, create an ODBC data source, and the driver that connects to the Access database has.
The problem I met was solved.
The above nonsense so much, summed up: this reason is because your JDK and ODBC data source bits inconsistent
Jdbc-odbc Bridge connection to an Access database