This week's book giveaways are in the Refactoring and Agile forums.
We're giving away four copies each of Re-engineering Legacy Software and Docker in Action and have the authors on-line!
See this thread and this one for details.
Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

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

 
pradeep srinivasan
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 20495
54
Chrome Eclipse IDE Java Windows
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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).
 
pradeep srinivasan
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you Rob Spoor
 
Rob Spoor
Sheriff
Pie
Posts: 20495
54
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You're welcome. And a belated welcome to the Ranch!
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic