Posts
22
Comments
75
Trackbacks
0
Windows 7 64Bit Microsoft Access 2007 Problem [Solved] "architecture mismatch between the Driver and Application"

I just installed my PC with Windows 7 64bit, Microsoft Office 2007 and Visual Studio 2010. I was trying something and I have decided to use Microsoft Access as my database, After a few minutes I found my self scratching my head because I cannot Connect My App to my MS Access Database because of thess errors

"The setup routines for the Microsoft Access Driver(*.mdb, *.accdb) ODBC driver could not be found. Please reinstall the driver"

Errors Found: The specified DSN contains an architecture mismatch between the Driver and Application

 

Here are some screen shots

 

After googling around I found this 2007 Office System Driver: Data Connectivity Components Just Download and install it.

and I also found this Windows 7 RC ODBC Access driver, So this lead me to C:\Windows\SysWow64. So what I did was to create a DSN File named MyAccessDatabase.dsn using the odbcad32.exe found inside C:\Windows\SysWow64 instead of the Data Sources (ODBC) Applet found under the Administrative Tools Control Panel Folder

Here's the resulting DNS File

[ODBC]
DRIVER=Microsoft Access Driver (*.mdb, *.accdb)
UID=admin
UserCommitSync=Yes
Threads=3
SafeTransactions=0
PageTimeout=5
MaxScanRows=8
MaxBufferSize=2048
FIL=MS Access
DriverId=25
DefaultDir=c:\Data
DBQ=C:\Data\database.accdb

So this Works Perfectly now Cool

OdbcConnection cnn = new OdbcConnection();
cnn.ConnectionString = @"filedsn=C:\Data\MyAccessDatabase.dsn;
Uid=admin;Pwd=password;"
;

try
{
cnn.Open();
MessageBox.Show(cnn.State.ToString());
}
catch (Exception ex)
{
MessageBox.Show(ex.ToString());
}
finally
{
cnn.Close();
}

 

But if you dont use a File DSN this should Work Fine......

OleDbConnection cnn = new OleDbConnection(@"Provider=Microsoft.ACE.OLEDB.12.0;
Data Source=c:\database.accdb;Jet OLEDB:Database Password=password;"
);

posted on Wednesday, March 23, 2011 9:58 PM Print
Comments
Gravatar
# re: Windows 7 64Bit Microsoft Access 2007 Problem [Solved] "architecture mismatch between the Driver and Application"
Mustafa Iqbal
6/3/2012 9:57 PM
thanks dear,
but after installing " 2007 Office System Driver: Data Connectivity Components" there is no other sources added in "data source" (on click ("dBase Files" or MSAccess Database" ) accept "SQL Native Client, Sql Server or SQL Server Native Client...."
so, if u don't mind please send me the method of adding ODBC (Access Database)
mustafaiqbal97@gmail.com

Thanks Again,
Gravatar
# re: Windows 7 64Bit Microsoft Access 2007 Problem [Solved] "architecture mismatch between the Driver and Application"
sanjeev
4/12/2013 1:30 PM
Its important plz help me.
but after installing " 2007 Office System Driver: Data Connectivity Components" there is no other sources added in "data source" (on click ("dBase Files" or MSAccess Database" ) accept "SQL Native Client, Sql Server or SQL Server Native Client...."
so, if u don't mind please send me the method of adding ODBC (Access Database)
Gravatar
# re: Windows 7 64Bit Microsoft Access 2007 Problem [Solved] "architecture mismatch between the Driver and Application"
Mamta
7/10/2013 11:59 AM
Thank you for this help!!!!
It really resolve the problem of Access Driver in Windows 7!!!
Gravatar
# re: Windows 7 64Bit Microsoft Access 2007 Problem [Solved] "architecture mismatch between the Driver and Application"
charan
7/25/2014 6:18 PM
i installed this software but till i got same problem what we seen in above, and in ststem dsn i will find only sql driver only i cant get any other will u please guide me.
Gravatar
# re: Windows 7 64Bit Microsoft Access 2007 Problem [Solved] "architecture mismatch between the Driver and Application"
belinda
1/8/2016 2:37 AM
I have a database that I'm getting an invalid error. it says make sure that the path name is spelled correctly and that you are connected to th server in which the file resides. It was working and I started getting this error in the middle of the day.

Post Comment

Title *
Name *
Email
Comment *  
Verification
Tag Cloud