[RESOLVED] Program Loading Databases Windows 7
Hello,
I got a new cmputer the other day and it came with Windows 7 64bit,but I noticed some of my db projects are not working, and keep comming up with this error
The 'Microsoft.Jet.OLEDB.4.0' provider is not registered on the local machine.
I use this code to open the database.
Code:
ConnectStr = "PROVIDER=Microsoft.Jet.OLEDB.4.0;DATA SOURCE=" + _dbfile;
//Create new connection
cnn = new OleDbConnection(ConnectStr);
try
{
cnn.Open();
}
//Error flag
catch(Exception err)
{
MessageBox.Show(err.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
this.Close();
return;
}
I also downloaded the database access components, but for some reason the installer just does not work. eveything worked fine in Windows Vista. anyway hope someone can help thanks.
Re: Program Loading Databases Windows 7
The problem is the Jet 4 driver. You need to comple the code for 32 bit CPU and not Any CPU. There is no 64 bit driver for Jet
Re: Program Loading Databases Windows 7
Quote:
Originally Posted by
GaryMazzone
The problem is the Jet 4 driver. You need to comple the code for 32 bit CPU and not Any CPU. There is no 64 bit driver for Jet
hay,
did you mean he can not add Jet 4 to his project because his CPU is 64 bit ???
Re: Program Loading Databases Windows 7
The Jet driver/provider will not work in a 64 bit program.
You either need to force the program to be 32 bit (as GaryMazzone explained), or get rid of Jet and use ACE instead - the latest version is 64 bit compatible.