aspose file tools*
The moose likes JDBC and the fly likes Connectivity to MS Access usin DSN ,Facing Error Architechture Mismatch between driver n Application Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Connectivity to MS Access usin DSN ,Facing Error Architechture Mismatch between driver n Application" Watch "Connectivity to MS Access usin DSN ,Facing Error Architechture Mismatch between driver n Application" New topic
Author

Connectivity to MS Access usin DSN ,Facing Error Architechture Mismatch between driver n Application

pradeep srinivasan
Greenhorn

Joined: Jul 29, 2012
Posts: 2
Hi CodeRanch,

I m using Windows 7 64 Bit, my installed version of java is also 64bit

I m using 32 Bit MS Access 2007/2010

I m connecting to a access database using 64 bit driver, I know this for sure because when i right click on Data Sources ODBC in my control panel\Administrative tools,then i click on properties option the target textbox displays "%windir%\SysWOW64\odbcad32.exe"

After I successfully create a DSN , I compiled my program then it displays the error Architechture mismatch between the driver and application.

PS.I cannot find the 32 bit drivers in my system,I also tried installing the Access Database Engine for 32bit drivers in my system.This does not solve the problem.

I have the following questions
1.Is there 64 bit office installation out there ?
2.How can I connect my database to my java program without using a DSN.
Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 19692
    
  20

pradeep srinivasan wrote:I m connecting to a access database using 64 bit driver, I know this for sure because when i right click on Data Sources ODBC in my control panel\Administrative tools,then i click on properties option the target textbox displays "%windir%\SysWOW64\odbcad32.exe"

You're assumption is wrong. The "SysWOW64" does not mean it's a 64 bit application. On the contrary - the "WOW64" part stands for "Windows 32-bit on Windows 64-bit". In other words, you're trying to use a 32-bit DSN from a 64-bit application, and that doesn't work. You need to create a 64-bit DSN, or use a 32-bit JVM.

2.How can I connect my database to my java program without using a DSN.

By using a proper JDBC driver. However, I don't know any free Access drivers, I've always used the DSN way (which I never could get to work in 64-bit).


SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6
How To Ask Questions How To Answer Questions
pradeep srinivasan
Greenhorn

Joined: Jul 29, 2012
Posts: 2
Thank you Rob Spoor
Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 19692
    
  20

You're welcome. And a belated welcome to the Ranch!
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Connectivity to MS Access usin DSN ,Facing Error Architechture Mismatch between driver n Application