简体   繁体   中英

Error using access db with java/eclipse juno

I'm having trouble with this line....

Connection conn = DriverManager.getConnection("jdbc:odbc:DBNAME_HERE", "Java", "Java");

here's the error...

[Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified

I've set up the access driver in windows admin tools but its just the generic driver nothing partivular about the db file im actually using.

Ive not long moved to 64 bit win 8 and this ran fine on the old 32 bit 7 set up so Im assuming im just missing something little.

All help appreciated

If your Java application is running as a 64-bit process then you need to have the 64-bit version of the Access Database Engine (ACE) installed. You can download the installer here .

Also, if you intend to use an ODBC DSN then you need to create it in the 32-bit or 64-bit "world", depending on whether your application runs as 32-bit or 64-bit.

64-bit DSNs can be managed via

Control Panel > Administrative Tools > Data Sources (ODBC)

32-bit DSNs can be managed by running

C:\Windows\SysWOW64\odbcad32.exe

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM