As part of a C# program that i trying to fix I run it on my machine and i got this error:
I figured out that the problem is with my Microsoft Access Database Engine and i install the 64 bit version but i got this message :
and i tried to install the 32 bit version and i got this message :
someone saw something like that and can help me please?
Ok, a few things:
First, you have to decide or determine what bit size your going to run your .net application as.
If you chose "any" cpu, or choose x86 then of course your .net application will run as x32. The reason why "any cpu" ALSO runs as x32 bits is because Visual Studio (VS) is a x32 bit application. So "any" means .net will take on the bit size of the host process.
The simple issue is you need/want/better specify the .net project bit size and force this issue. If you don't then you can wind up wasting a whole afternoon. KEEP VERY much in mind that if you decide and are using x64 bits for your .net application? Well, you CAN STILL use the connection string wizards and builders in VS, but when you go to TEST connection, for a x64 bit version the test connection dialogs in VS will fail. This is because VS is a x32 bit application. So, even with x64 bit ACE/AccessDatabase, you find the test connection wll fail. However, if your application is set to x64, then running it will work. So, keep this quirk in mind. So, while VS is x32 bits, when you run/debug the application it will respect your project bit settings, but the connection builders will fail on test (so you can use the connection builders - say in the settings panel from VS, but the test connection button will fail).
So, don't use "any cpu" for your project settings. Use x86, or x64 (ie: the bit size you want and plan to use).
Next up:
Normally if you have office (and access) installed, in the past, then this would expose and allow use of the ACE database engine. However, for office 2013 and onwards, installing office, Access, or Access runtime DOES NOT expose the ACE database engine anymore. Because of large amounts of confusing on this issue, for Access 2019, (full or runtime), they have reversed this policy. (so, now once again ACE will be exposed with a Access install).
And prior to 2013, installing Access full or runtime will also work and expose the ACE database engine.
Note that it is recommended that you use the SAME connection string for all versions of the ACE database engine. (from 2007, all the way to 2019). That correct connection string is thus this:
That means for ACE 2007, 2010, 2013, 2016, 2019, we are to use this:
If using oleDB provider then:
Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\test2\test44.accdb
If using ODBC provider then:
Driver={Microsoft Access Driver (*.mdb, *.accdb)};
dbq=C:\Test2\test44.accdb;defaultdir=C:\Test2;
Installing the ACE data engine in place of the larger and heaver Access (or access runtime) install.
Now, assuming you don't have Access installed. And assuming that you dealig with 2013, 2016, then you quite much need to install the ACE data engine.
You want to download the ace engine from here:
https://www.microsoft.com/en-us/download/details.aspx?id=54920
Make sure you download and attempt to install the correct bit size version.
Getting around the dialog boxes that complain about office x32 or x64 already having been installed. It turns out that so many bits and parts of office are shared between all programs, that if you install say Excel, x32, then you cannot install ANY OTHER office program from word to power-point or Access as x64. You can install DIFFERNT versions of office, but NEVER mix and match bit size for a GIVEN version of office. This is due to the large amounts of .dll's and shared code between office programs.
HOWEVER, you CAN force the ACE engine to install , and install regardless of the bit size.
Download the ACE engine install (your desired bit size). But now launch the installer from the command line. Add the /quiet switch to the install. This will cause the installer to by-pass the nagging and complains about the bit size.
So, from command prompt, go:
C:\runtimetest>AccessDatabaseEngine.exe /quiet
or for x64, I think its:
C:\runtimetest>AccessDatabaseEngine_64.exe /quiet
(going form memory - but just use the /quiet swtich - it should allow you to proceed with the install.
Last but not least:
You can download my sample utility here:
https://1drv.ms/u/s!Avrwal_LV4qxhpdBSWWSP5Ivv38AZw?e=dTVQis
It is a small tiny .net exe file (no install). It has a x32 bit version, and a x64 bit version. You can run/try/test either version to see which bit size of access works, or is installed.
It shows this:
If the above utility don't work (x32 or x64 version), then you don't have a valid working ACE database engine installed.
Related
I'm currently using access database engine 2010 (AccessRuntime 2013) to open and query various database files, .xls, .xlsx, .accessdb, .xml, .txt/csv/tab, .mdb, .dbf, etc...
But now I need to build a x64 application to do the same. However this creates a problem, on x64 PC's that still run Ms Office x86 or have other applications that use the x86 Access Database engine 2010.
The Access x64 runtime wont install next to the x86 version (you can force Access Database engine 2010 with /passive but this damages the x86 version and stops some applications to work at all (including old versions of my own software).
I've read a tone of topics about this issue, but never a solution.
I'm searching for an alternative to the Microsoft access database engine/runtime that allowes me to query various database files in C# or C++
Does anyone have any suggestions how to achieve this?
I have finished designing my C# application which stores employees data in an Access database. The program works perfectly when I install Microsoft Office 2007 on my machine, but causes an error if I uninstall Office 2007. Now, I wonder if there is a method which enables my program to connect to the Access database without installing the whole Microsoft office 2007.
using System.Data.OleDb;
If your connection string uses the Microsoft.ACE.OleDb.12.0 provider then you need the Microsoft Access Database Engine installed on the client.
At the link provided you could find the installation of the two versions of this provider.
One for 32bit and one for 64bit.
The right one to use depends by the Target CPU defined in your app and by the operating system bitness. Of course on a 32bit OS you cannot install a 64bit provider while the reverse is possible.
If your app is compiled for x86 as Target CPU then you need the 32bit version and you could install your app also on 64bit systems. If your app is compiled for x64 Target CPU then you need the 64bit version and you could run only on 64bit systems. If your app is compiled for Any CPU then you should decide at install time which version of ACE.OleDb.12.0 to install depending on the bitness of the operating system.
If this is not enough to give you headache then things start to look very bad if there is an Office already installed on the client machine.
Office installs automatically the provider compatible with its version (32 or 64 bit) and you cannot install a different version of these libraries side by side with the other one.
So what are your best options?
Write your app for x86 Target CPU and provide a dedicated setup for
systems where Office 64 bit is installed or ask your customer to change Office version. (I'm kidding)
Write your app for AnyCPU Target, check at install time the OS bitness and choose the appropriate version of the engine. On 64bit systems hope that your customer has not
installed a 32bit version of Office.
Use the Access 2003 format (mdb) and compile for x86 Target CPU. This
approach requires the Microsoft.Jet.OleDb.4.0 provider that should
be already available on any target client. It doesn't require to install
anything and it should work flawlessy on any system.
Switch to SQLite or Sql Server Compact Edition or Sql Server
LocalDB. These options requires a complete retesting of the
application, database schema migration and probably code changes. Still, dedicated
libraries, are needed to distribute
Personally for small, single user applications, with limited amount of data (less than 1gb) and with integration with other Office applications I use the Access 2003 MDB solution.
I created a windows application developed in .NET 3.5 in a 32 bit Windows 2008 server. When deployed the application in a 64 bit server it shows the error "Microsoft.Jet.OLEDB.4.0' provider is not registered on the local machine ".
So as a solution to this issue, i have changed the build property of the project to X86, so that it will build in 32 bit mode, and rebuild the project in the 32bit machine. But, the same project uses other DB drivers (DB2, SQL etc.) to connect to other databases. So when i deployed my app again in the 64 bit OS, it throws the exception " Attempted to load a 64-bit assembly on a 32-bit platform. "
I am using the Microsoft.Jet.OLEDB.4.0 driver to read and write to the Excel (.xls)
I found a solution for this problem. The issue I described in my question occured basically due to the incompatibility of the Microsoft.Jet.OLEDB.4.0 driver in 64 bit OS.
So if we are using Microsoft.Jet.OLEDB.4.0 driver in a 64 bit server, we have to force our application to build in in 32 bit mode (This is the answer I found when I did an extensive search for this known issue) and that causes other part of my code to break.
Fortunately, now Microsoft has released a 64 bit compatible 2010 Office System Driver which can be used as replacement for the traditional Microsoft.Jet.OLEDB.4.0 driver. It works both in 32 bit as well as 64 bit servers. I have used it for Excel file manipulation and it worked fine for me in both the environments. But this driver is in BETA.
You can download this driver from Microsoft Access Database Engine 2010 Redistributable
If the issue persist in ASP.NET,All I had to do was change the "Enable 32-bit Applications" setting to True, in the Advanced Settings for the Application Pool.
I have the same problem
Microsoft.Jet.OLEDB.4.0' provider is not registered on the local
machine
I applied the answer by neo but it did not work until I change the provider to “Provider=Microsoft.ACE.OLEDB.12.0;” in connection string.
Hope this will help if some one face the same issue.
I know it's quite old questions and many persons has answered. but I am summarizing the things for understanding:
If the file extension is xls and OS is 32 bit then only you can use "Microsoft.Jet.OLEDB.4.0". Microsoft has not released 64 bit version of this driver.
If file extension is xlsx or OS is 64 bit then you must have to use "Microsoft.ACE.OLEDB.12.0". The application compiled in 32/64 bit mode does not impact the selection of driver.
Always install the 64 bit driver of Microsoft.ACE.OLEDB.12.0 on OS 64 bit. If you have already installed Office 32 bit then you need to run driver from cmd with /passive argument. This hack works till Office 2013 only, Microsoft stopped this workaround from Office 2016 for Microsoft.ACE.OLEDB.16.0 drivers.
AccessDatabaseEngine_x64.exe /passive
Download drivers Microsoft.ACE.OLEDB.12.0
private void ProcessFile(string path)
{
string connString = string.Empty;
if (Path.GetExtension(path).ToLower().Trim() == ".xls" && Environment.Is64BitOperatingSystem == false)
connString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + path + ";Extended Properties=\"Excel 8.0;HDR=Yes;IMEX=2\"";
else
connString = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" + path + ";Extended Properties=\"Excel 12.0;HDR=Yes;IMEX=2\"";
}
If Application is compiled with AnyCPU flag, it will look for 64 bit Access drivers on 64 bit OS and 32 bit access drivers on 32 bit OS.
If your application runs on localIIS, You can solve this problem by enabling 32-bit applications in AppPool's Advanced Settings
I've the same message, I have a webpage with do on visual studio 2010, I read a file.xls on that page,in my project visual has not any problem, when I put it on my IIS local throw me a 'Microsoft.Jet.OLEDB.4.0' provider is not registered on the local machine'
,I fixed that problem next following this steps,
1.-Open IIS
2.-Change the appPool on Advanced Settings
3.-true to enable to 32-bit application.
and that's all
ps.I changed Configuration Manager to X86 on Active Solution Platform
I had the same issue. I changed the application configuration to x86, then it worked!
I just Changed my Property of project into x64 format
Project---> Properties--->Build--->Target Framework---> X64
We have come across this issue in desktop app.
Dev Environment:
Windows 7 Ultimate - 64 bit
.Net Framework 4.5
Provider=Microsoft.Jet.OLEDB.4.0
It has been resolved by changing Platform target to X86 from Any CPU.
Project Properties >> Build >> Platform Target.
I ran into this issue with my desktop application ('Microsoft.Jet.OLEDB.4.0' provider is not registered on the local machine). I did not have the option to build as a 32 bit app. Hoping this would help others in the same situation.
I did the following and the issue went away:
Installed the 64 bit version of Microsoft Access Database Engine
2010 Redistributable, as suggested by neo
Changed my provider to Microsoft.ACE.OLEDB.12.0
Although a more optimal solution is to simply recompile as suggested above, that requires access to the source code. In my case, I only had the finished .exe and had to use this solution. It uses CorFlags.exe from the .Net SDK to change the loading characteristics of the application.
Download the .Net Framework SDK (I personally used 3.5, but the version used should be at or above the required .Net for your application.
When installing, all you need is CorLibs.exe, so just check Windows Development Tools.
After installation, find your CorFlags.exe. For my install of the .Net Framework 3.5 SDK, it was at C:\Program Files\Microsoft SDKs\Windows\v7.0\Bin.
Open a command prompt and type path/to/CorFlags.exe path/to/your/exeFile.exe /32Bit+.
You're done! This sets the starting flags for your program so that it starts in 32 bit WOW64 mode, and can therefore access microsoft.jet.oledb.4.0.
Change in IIS Settings application pool advanced settings.Enable 32 bit application
Just Change the property based on your machine and all have done :-)
Project---> Properties--->Build--->Target Framework---> X64
or
Project---> Properties--->Build--->Target Framework---> X86
I have changed my connection string from
var myConnectionString = string.Format("Provider=Microsoft.Jet.OLEDB.4.0;Data Source={0};Persist Security Info=True;Jet OLEDB:Database Password=;",gisdbPath);
to this:
var myConnectionString = string.Format("Provider=Microsoft.Jet.OLEDB.4.0;Mode=Share Deny None;Data Source={0};user id=Admin;password=;", gisdbPath);
It works fro me never asked for Microsoft.Jet.OLEDB.4.0'registered.
There is indeed no 64 bit version of Jet - and no plans (apparently) to produce one.
You might be able to use the ACE 64 bit driver:
http://www.microsoft.com/en-us/download/details.aspx?displaylang=en&id=23734
but I have no idea how that would work if you need to go back to Jet for your 32 bit apps.
However, you may be able to switch the project to 32bit in the Express version (I haven't tried and don't have 2008 installed in any flavour anymore)
there is a thread here that talks about it:
http://xboxforums.create.msdn.com/forums/t/4377.aspx#22601
Maybe it's time to scrap Access databases altogether, bite the bullet and go for SQL server instead?
I'm using VS2013 for Winforms, the below solution worked for me.
Download : http://www.microsoft.com/en-us/download/details.aspx?displaylang=en&id=23734
Then Set VS Target Platform to x86.
In older versions of IIS, you will not find Advance Settings so to enable Enable 32-bit Applications you have to execute the following commands:
cscript %SYSTEMDRIVE%\inetpub\adminscripts\adsutil.vbs SET W3SVC/AppPools/Enable32bitAppOnWin64 1
and
%SYSTEMROOT%\Microsoft.NET\Framework\v2.0.50727\aspnet_regiis.exe -i
Reference : Here
I was getting same exception while running "SQL Server 2014 Import and Export Data (64-bit)" on my Windows 8.1.
To fix the issue this issue I have done the following
started SQL Server 2014 Import and Export Data (32-bit) instead of 64-bit and it is working for me. I haven't changed any IIS setting and not installed any extra software.
I know that I have this problem over and over when I deploy my application on a new server because I'm using this driver to connect to a Excel file. So here it is what I'm doing lately.
There's a Windows Server 2008 R2, I install the Access drivers for a x64 bit machine and I get rid of this message, which makes me very happy just to bump into another.
This one here below works splendidly on my dev machine but on server gives me an error even after installing the latest ODBC drivers, which I think this is the problem, but this is how I solved it.
private const string OledbProviderString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=|DataDirectory|\\OlsonWindows.xls;Extended Properties=\"Excel 8.0;HDR=YES\"";
I replace with the new provider like this below:
private const string OledbProviderString = #"Provider=Microsoft.ACE.OLEDB.12.0;Data Source=|DataDirectory|\OlsonWindows.xlsx;Extended Properties='Excel 12.0;HDR=YES;';";
But as I do this, there's one thing you should notice. Using the .xlsx file extension and Excel version is 12.0.
After I get into this error message Error: "Could Not Find Installable ISAM", I decide to change the things a little bit like below:
private const string OledbProviderString = #"Provider=Microsoft.ACE.OLEDB.12.0;Data Source=|DataDirectory|\OlsonWindows.xls;Extended Properties='Excel 8.0;HDR=YES;';";
and yes, I'm done with that nasty thing, but here I got another message The Microsoft Access database engine cannot open or write to the file 'time_zone'. It is already opened exclusively by another user, or you need permission to view and write its data. which tells me I'm not far away from solving it.
Maybe there's another process that opened the file meanwhile and all that I have to do is a restart and all will take start smoothly running as expected.
go to Start->Run and type cmd
this starts the Command Prompt
(also available from Start->Programs->Accessories->Command Prompt)
type cd .. and press return
type cd .. and press return again (keep doing this until the prompt shows :> )
now you need to go to a special folder which might be c:\windows\system32 or it might be c:\winnt\system32 or it might be c:\windows\sysWOW64
try typing each of these eg
cd c:\windows\sysWOW64
(if it says The system cannot find the path specified, try the next one)
cd c:\windows\system32
cd c:\winnt\system32
when one of those doesn't cause an error, stop, you've found the correct folder.
now you need to register the OLE DB 4.0 DLLs by typing these commands and pressing return after each
regsvr32 Msjetoledb40.dll
regsvr32 Msjet40.dll
regsvr32 Mswstr10.dll
regsvr32 Msjter40.dll
regsvr32 Msjint40.dll
There isn't a 64 bit provider for Jet. If you want to support multiple DB sources including Jet to Excel you will need at least that part of your application to run in a 32 bit process.
The error you are getting when you compile for x86 is a bit strange. I can't see how you would end up referencing 64 bit assemblies in this case.
I have 64-bit Office installed on my computer and also the 64-bit Microsoft Access database engine.
Even though MADE (Microsoft Access Database Engine) is installed, Visual Studio is throwing an error as shown in the screenshot.
Try installing this first: http://www.microsoft.com/download/en/details.aspx?id=13255
If that doesnt work for you, try the following method:
NOTE: this DOES work for office 2010 even though it is for 2007 office :)
download and install this: http://www.microsoft.com/download/en/confirmation.aspx?id=23734
in VS click add data source, follow the wizard and enjoy! :)
1.Try to download this from here: http://www.microsoft.com/en-us/download/confirmation.aspx?id=23734
2.Go to Visual Studio click add data source, follow the wizard.
This is the same problem I had before and followed steps from here:
http://social.msdn.microsoft.com/Forums/en-US/vstsdb/thread/1d5c04c7-157f-4955-a14b-41d912d50a64
http://social.technet.microsoft.com/Forums/en-US/officesetupdeploylegacy/thread/cc10d906-0fd8-49ef-a1b0-45814bd70c55/
You need to install the x86 version if the target machine is 32 bit or the x64 version if the target machine is 64 bit and your application is built with configuration Any CPU.
I created a windows application developed in .NET 3.5 in a 32 bit Windows 2008 server. When deployed the application in a 64 bit server it shows the error "Microsoft.Jet.OLEDB.4.0' provider is not registered on the local machine ".
So as a solution to this issue, i have changed the build property of the project to X86, so that it will build in 32 bit mode, and rebuild the project in the 32bit machine. But, the same project uses other DB drivers (DB2, SQL etc.) to connect to other databases. So when i deployed my app again in the 64 bit OS, it throws the exception " Attempted to load a 64-bit assembly on a 32-bit platform. "
I am using the Microsoft.Jet.OLEDB.4.0 driver to read and write to the Excel (.xls)
I found a solution for this problem. The issue I described in my question occured basically due to the incompatibility of the Microsoft.Jet.OLEDB.4.0 driver in 64 bit OS.
So if we are using Microsoft.Jet.OLEDB.4.0 driver in a 64 bit server, we have to force our application to build in in 32 bit mode (This is the answer I found when I did an extensive search for this known issue) and that causes other part of my code to break.
Fortunately, now Microsoft has released a 64 bit compatible 2010 Office System Driver which can be used as replacement for the traditional Microsoft.Jet.OLEDB.4.0 driver. It works both in 32 bit as well as 64 bit servers. I have used it for Excel file manipulation and it worked fine for me in both the environments. But this driver is in BETA.
You can download this driver from Microsoft Access Database Engine 2010 Redistributable
If the issue persist in ASP.NET,All I had to do was change the "Enable 32-bit Applications" setting to True, in the Advanced Settings for the Application Pool.
I have the same problem
Microsoft.Jet.OLEDB.4.0' provider is not registered on the local
machine
I applied the answer by neo but it did not work until I change the provider to “Provider=Microsoft.ACE.OLEDB.12.0;” in connection string.
Hope this will help if some one face the same issue.
I know it's quite old questions and many persons has answered. but I am summarizing the things for understanding:
If the file extension is xls and OS is 32 bit then only you can use "Microsoft.Jet.OLEDB.4.0". Microsoft has not released 64 bit version of this driver.
If file extension is xlsx or OS is 64 bit then you must have to use "Microsoft.ACE.OLEDB.12.0". The application compiled in 32/64 bit mode does not impact the selection of driver.
Always install the 64 bit driver of Microsoft.ACE.OLEDB.12.0 on OS 64 bit. If you have already installed Office 32 bit then you need to run driver from cmd with /passive argument. This hack works till Office 2013 only, Microsoft stopped this workaround from Office 2016 for Microsoft.ACE.OLEDB.16.0 drivers.
AccessDatabaseEngine_x64.exe /passive
Download drivers Microsoft.ACE.OLEDB.12.0
private void ProcessFile(string path)
{
string connString = string.Empty;
if (Path.GetExtension(path).ToLower().Trim() == ".xls" && Environment.Is64BitOperatingSystem == false)
connString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + path + ";Extended Properties=\"Excel 8.0;HDR=Yes;IMEX=2\"";
else
connString = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" + path + ";Extended Properties=\"Excel 12.0;HDR=Yes;IMEX=2\"";
}
If Application is compiled with AnyCPU flag, it will look for 64 bit Access drivers on 64 bit OS and 32 bit access drivers on 32 bit OS.
If your application runs on localIIS, You can solve this problem by enabling 32-bit applications in AppPool's Advanced Settings
I've the same message, I have a webpage with do on visual studio 2010, I read a file.xls on that page,in my project visual has not any problem, when I put it on my IIS local throw me a 'Microsoft.Jet.OLEDB.4.0' provider is not registered on the local machine'
,I fixed that problem next following this steps,
1.-Open IIS
2.-Change the appPool on Advanced Settings
3.-true to enable to 32-bit application.
and that's all
ps.I changed Configuration Manager to X86 on Active Solution Platform
I had the same issue. I changed the application configuration to x86, then it worked!
I just Changed my Property of project into x64 format
Project---> Properties--->Build--->Target Framework---> X64
We have come across this issue in desktop app.
Dev Environment:
Windows 7 Ultimate - 64 bit
.Net Framework 4.5
Provider=Microsoft.Jet.OLEDB.4.0
It has been resolved by changing Platform target to X86 from Any CPU.
Project Properties >> Build >> Platform Target.
I ran into this issue with my desktop application ('Microsoft.Jet.OLEDB.4.0' provider is not registered on the local machine). I did not have the option to build as a 32 bit app. Hoping this would help others in the same situation.
I did the following and the issue went away:
Installed the 64 bit version of Microsoft Access Database Engine
2010 Redistributable, as suggested by neo
Changed my provider to Microsoft.ACE.OLEDB.12.0
Although a more optimal solution is to simply recompile as suggested above, that requires access to the source code. In my case, I only had the finished .exe and had to use this solution. It uses CorFlags.exe from the .Net SDK to change the loading characteristics of the application.
Download the .Net Framework SDK (I personally used 3.5, but the version used should be at or above the required .Net for your application.
When installing, all you need is CorLibs.exe, so just check Windows Development Tools.
After installation, find your CorFlags.exe. For my install of the .Net Framework 3.5 SDK, it was at C:\Program Files\Microsoft SDKs\Windows\v7.0\Bin.
Open a command prompt and type path/to/CorFlags.exe path/to/your/exeFile.exe /32Bit+.
You're done! This sets the starting flags for your program so that it starts in 32 bit WOW64 mode, and can therefore access microsoft.jet.oledb.4.0.
Change in IIS Settings application pool advanced settings.Enable 32 bit application
Just Change the property based on your machine and all have done :-)
Project---> Properties--->Build--->Target Framework---> X64
or
Project---> Properties--->Build--->Target Framework---> X86
I have changed my connection string from
var myConnectionString = string.Format("Provider=Microsoft.Jet.OLEDB.4.0;Data Source={0};Persist Security Info=True;Jet OLEDB:Database Password=;",gisdbPath);
to this:
var myConnectionString = string.Format("Provider=Microsoft.Jet.OLEDB.4.0;Mode=Share Deny None;Data Source={0};user id=Admin;password=;", gisdbPath);
It works fro me never asked for Microsoft.Jet.OLEDB.4.0'registered.
There is indeed no 64 bit version of Jet - and no plans (apparently) to produce one.
You might be able to use the ACE 64 bit driver:
http://www.microsoft.com/en-us/download/details.aspx?displaylang=en&id=23734
but I have no idea how that would work if you need to go back to Jet for your 32 bit apps.
However, you may be able to switch the project to 32bit in the Express version (I haven't tried and don't have 2008 installed in any flavour anymore)
there is a thread here that talks about it:
http://xboxforums.create.msdn.com/forums/t/4377.aspx#22601
Maybe it's time to scrap Access databases altogether, bite the bullet and go for SQL server instead?
I'm using VS2013 for Winforms, the below solution worked for me.
Download : http://www.microsoft.com/en-us/download/details.aspx?displaylang=en&id=23734
Then Set VS Target Platform to x86.
In older versions of IIS, you will not find Advance Settings so to enable Enable 32-bit Applications you have to execute the following commands:
cscript %SYSTEMDRIVE%\inetpub\adminscripts\adsutil.vbs SET W3SVC/AppPools/Enable32bitAppOnWin64 1
and
%SYSTEMROOT%\Microsoft.NET\Framework\v2.0.50727\aspnet_regiis.exe -i
Reference : Here
I was getting same exception while running "SQL Server 2014 Import and Export Data (64-bit)" on my Windows 8.1.
To fix the issue this issue I have done the following
started SQL Server 2014 Import and Export Data (32-bit) instead of 64-bit and it is working for me. I haven't changed any IIS setting and not installed any extra software.
I know that I have this problem over and over when I deploy my application on a new server because I'm using this driver to connect to a Excel file. So here it is what I'm doing lately.
There's a Windows Server 2008 R2, I install the Access drivers for a x64 bit machine and I get rid of this message, which makes me very happy just to bump into another.
This one here below works splendidly on my dev machine but on server gives me an error even after installing the latest ODBC drivers, which I think this is the problem, but this is how I solved it.
private const string OledbProviderString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=|DataDirectory|\\OlsonWindows.xls;Extended Properties=\"Excel 8.0;HDR=YES\"";
I replace with the new provider like this below:
private const string OledbProviderString = #"Provider=Microsoft.ACE.OLEDB.12.0;Data Source=|DataDirectory|\OlsonWindows.xlsx;Extended Properties='Excel 12.0;HDR=YES;';";
But as I do this, there's one thing you should notice. Using the .xlsx file extension and Excel version is 12.0.
After I get into this error message Error: "Could Not Find Installable ISAM", I decide to change the things a little bit like below:
private const string OledbProviderString = #"Provider=Microsoft.ACE.OLEDB.12.0;Data Source=|DataDirectory|\OlsonWindows.xls;Extended Properties='Excel 8.0;HDR=YES;';";
and yes, I'm done with that nasty thing, but here I got another message The Microsoft Access database engine cannot open or write to the file 'time_zone'. It is already opened exclusively by another user, or you need permission to view and write its data. which tells me I'm not far away from solving it.
Maybe there's another process that opened the file meanwhile and all that I have to do is a restart and all will take start smoothly running as expected.
go to Start->Run and type cmd
this starts the Command Prompt
(also available from Start->Programs->Accessories->Command Prompt)
type cd .. and press return
type cd .. and press return again (keep doing this until the prompt shows :> )
now you need to go to a special folder which might be c:\windows\system32 or it might be c:\winnt\system32 or it might be c:\windows\sysWOW64
try typing each of these eg
cd c:\windows\sysWOW64
(if it says The system cannot find the path specified, try the next one)
cd c:\windows\system32
cd c:\winnt\system32
when one of those doesn't cause an error, stop, you've found the correct folder.
now you need to register the OLE DB 4.0 DLLs by typing these commands and pressing return after each
regsvr32 Msjetoledb40.dll
regsvr32 Msjet40.dll
regsvr32 Mswstr10.dll
regsvr32 Msjter40.dll
regsvr32 Msjint40.dll
There isn't a 64 bit provider for Jet. If you want to support multiple DB sources including Jet to Excel you will need at least that part of your application to run in a 32 bit process.
The error you are getting when you compile for x86 is a bit strange. I can't see how you would end up referencing 64 bit assemblies in this case.