Can not access an EXCEL file on a 64-Bit Windows 7 with Visual Studio - visual-studio-2010

my Windows 7 is 64 bit. My Visual Studio project is target to x86. I have installed this:
http://www.microsoft.com/downloads/en/details.aspx?familyid=C06B8369-60DD-4B64-A44B-84B371EDE16D&displaylang=en#Requirements (the x32 version).
I get this error message: The 'Microsoft.ACE.OLEDB.14.0' provider is not registered on the local machine.
What do I wrong?

When you build the project you need to specify that you're specifically targeting x86 CPUs, not Any CPU.
I don't have VS 2010 installed here, so can't tell you exactly what to do, but either . . .
From the drop down that says "Any CPU" select x86.
Or on your project properties page (of the exe project) select "x86" for "Platform Target"

You need to take a look at 32-bit Microsoft ODBC Administrator to register the 32-bit driver. The one under Adminsitrative Tools is 64-bit only. Go to Windows\System32\, the search for odbcad32.exe. Click on System DSN, and register the 32-bit driver.

I'm using "Microsoft Access Database Engine 2010 Redistributable" in Win 7 64 bit without any issue. Try to install 64 bit version of "Access Database Engine".
I've got the following configuration
Win 7 64 bit
VS 2010 32 bit (there is no 64 bit)
Microsoft Access Database Engine 2010 Redistributable 64 bit
Cheers...
Muse Extensions

Related

Problem with Visual Studio when run on another pc

i have problem in Visual Studio 2019 when i run my project in my pc. It can run very well. But when i share my project to my instructor, she couldn't run it and error was occur. The error said " 'Microsoft .ACE.OLEDB.12.0' provider is not registered on local machine. any solution from this problem?
She needs to install the ACE drivers freely downloadable from Microsoft. See https://www.microsoft.com/en-us/download/details.aspx?id=13255
You need to ensure that if you compiled your project as x86 (32 bit) the the 32 bit ACE driver needs to be installed? If compiled as 64 bit, then 64 bit ACE driver should be installed.

IFilter not working on Microsoft Server 2012 R2 x64

I execute a program on Windows 10 x64 and works fine, but I execute the same program on Windows Server 2012 R2 x64 and get "Could not find a 32 bits IFilter dll for a file with an '.pptx' extension"
The program is a C# program that use IFilter to parse some files and get the text
I download all the Update for Microsoft Filter and still not working
The app was working in Platform target: "Any CPU" and Prefer 32-bit so the app search for the 32 bits dll.
Just uncheck the Prefer 32-bit and change the Platform target to "x64" for the project

Oracle.DataAccess not available for selection in Visual Studio 2013

I've recently set up a Windows 8.1 64 Bit Machine with Visual Studio 2013 (probably 32 bit, at least it installed itself at Program Files (x86)).
I've also installed the Oracle 11.2.0.1 64 Bit Client with Oracle Data Provider for .NET.
When I do gacutil /l | findstr Oracle.DataAccess, I get four entries, including the following:
Oracle.DataAccess, Version=2.112.1.0, ..., processorArchitecture=AMD64
However, I cannot find Oracle.DataAccess in any of the lists when trying to add an assembly (Oracle.Web is present under Assemblies->Extensions, though).
Do I have to install the 32 bit Oracle Client (or simply 32 bit ODP.NET) as Visual Studio is 32 bit? If so, will the software be able to run on a 64 bit system with a 64 bit application and 64 bit Oracle Client (with 64 bit ODP.NET)?
Yes, Visual Studio is an 32bit application.
It depends on your compilation target (x86 or x64 or AnyCPU) which Oracle Client you need for running/debugging your application, regardless of the architecture from Visual Studio.
AnyCPU will run as 64 bit on a 64 bit Windows (which is most likely the case)
Oracle.DataAccess does not appear because it is an 64bit assembly but your Visual Studio is 32bit.
There are several solutions:
In Add References use the Browse section and locate Oracle.DataAccess.dll manually. Typically you will find it in folder %ORACLE_HOME%\odp.net\bin\2.x\ or %ORACLE_HOME%\odp.net\bin\4\
Open your *.csproj, resp. *.vbproj file with a text editor and add reference manually, i.e. add lines like this under element <ItemGroup>:
<Reference Include="Oracle.DataAccess">
<SpecificVersion>False</SpecificVersion>
<Private>False</Private>
</Reference>
Note: attributes like Version=... or processorArchitecture=... are not required. Your application will load the correct Oracle.DataAccess.dll depending on selected architecture and target .NET framework (provided that it is installed properly - also on your target machine)
Install both x86 and x64 Oracle Client on your machine. Here is an instruction how to do this: Stack Overflow - Install Oracle x86 and x64
Use the ODP.NET Managed Driver from Oracle. You can download it from here: 64-bit Oracle Data Access Components (ODAC) Downloads This works also with 32bit applications.
Open your Registry editor and check if RegKey HKLM\SOFTWARE\Wow6432Node\Microsoft\.NETFramework\v2.0.50727\AssemblyFoldersEx\ODP.NET resp. HKLM\SOFTWARE\Wow6432Node\Microsoft\.NETFramework\v4.0.30319\AssemblyFoldersEx\ODP.NET exist. Both RegKeys contain only the (Default) value with location of your Oracle.DataAccess.dll.
Example:
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\.NETFramework\v2.0.50727\AssemblyFoldersEx\ODP.Net]
#="c:\\oracle\\product\\11.2\\Client_x86\\odp.net\\bin\\2.x"
[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\.NETFramework\v4.0.30319\AssemblyFoldersEx\ODP.Net]
#="c:\\oracle\\product\\11.2\\Client_x86\\odp.net\\bin\\4"
Check your target Framework in compile options. When you have ODP.NET version 4.x installed you must select target .NET Framework 4 or higher in order to see the ODP.NET entry in reference list.

How can I force IIS Express to run in 32 bit mode?

I have a classic ASP app that I'm trying to run under IIS Express on 64 bit Windows. It uses Jet to connect to a Microsoft Access database and will not work under 64 bit.
I have created the following application pool for the ASP app, but it seems to ignore the enable32BitAppOnWin64 attribute and the process is still 64 bit.
<applicationPools>
<add name="UnmanagedClassicAppPool32" managedRuntimeVersion="" managedPipelineMode="Classic" autoStart="true" enable32BitAppOnWin64="true" />
</applicationPools>
How can I get this app pool in IIS Express to run as a 32 bit process?
For Visual Studio 2013
Visual Studio 2015
Visual Studio 2017
Visual Studio 2019:
Tools
-> Options
-> Projects and Solutions
-> Web Projects
-> Uncheck "Use the 64 bit version of IIS Express for web sites and projects"`
According to this, IIS Express 7.5 comes only as a 32 bit application. IIS Express 8.0 however, comes with both 32 bit and 64 bit versions of the application. The 32 bit version can be found at c:\program files (x86)\IIS Express\iisexpress.exe and the 64 bit version can be found at c:\program files\IIS Express\iisexpress.exe.
IIS Express ignores the enable32BitAppOnWin64 attribute. To run the app pool as 32 bit, you must execute the 32 bit version of IIS Express.
You can determine which version is running in Task Manager by examining the process on the Processes tab. The 64 bit version will be displayed as iisexpress.exe and the 32 bit version will be displayed as iisexpress.exe *32.
Add <Use64BitIISExpress>false</Use64BitIISExpress> under the <PropertyGroup> tag of your csproj project.
It's also available through the UI by clicking on project properties -> Web tab -> Bitness (change to x64).
In IIS Express property window of VS studio, change the first option: 'Managed Application Pool' from 'Integrated' to 'Classic'
Are you sure?
It uses Jet to connect to a Microsoft Access database and will not work under 64 bit.
I had the same problem and eventually solved it by forcing the 64 bit drivers to install. Initially that failed because of an error that you can't install the 64 bit drivers if you have Office 2010 32 bit installed.
But ... you can force the 64 bit version of the Access Database Engine (ACE) from here to install with the 'passive' switch:
AccessDatabaseEngine_x64.exe /passive
And then I was able to run my legacy code with my current development environment.

Can I still develop 32-bit applications using a 64-bit machine?

I'm wondering if I can still develop 32-bit apps using a 64-bit machine (64-bit Windows Vista with Visual Studio 2008 SP1)? Because I am planning to buy a laptop with 64-bit Vista. Im asking just to make sure. Thanks!
64-bit Windows runs 32-bit Visual Studio just fine. Unless you specify you wish you use the x64 development tools, it will still compile 32-bit applications.
Straight from the page:
Visual Studio uses the 32-bit cross
compiler even on a Windows 64-bit
computer. You can, however, use devenv
commands to create a command line
environment to call 64-bit hosted
tools.
Further Information: http://msdn.microsoft.com/en-us/library/ms246588(VS.80).aspx
With Visual Studio you are able to target what platform. By default it will run on "Any CPU" (read 32 or 64 bit), but you can specify if you desire. Look under Project>Properties>Build and look for the "Platform Target" property.
Yes. 64-bit vista will run 32-bit executables, so if you have a 32-bit compiler, it will still work.
Within visual studio you can tell it what to compile to under the Configuration Manager - (Build Menu - Configuration manager) - this allows you to target 32 or 64 bit.
64bit of consumer hardwares is usually "amd64" architecture which can run both 32bit apps and 64bit ones natively. Windows Vista 64bit edition supports both 32bit and 64bit system libraries, so basically you can run both type of applications as well. (Note that IA-64 architecture does not allow this.)
Compiling a program in 64bit is not much related to the platform that the compiler runs. But, of course, to run and test the result binary requires the corresponding architecture.
As many mentioned above, VS2008 let you choose the target architecture, so there's no problem.
I've found that just the setup.exe created by Visual Studio 2012 Express won't work on XP, but if you go ahead load MS 4.0 .NET Framework from the Microsoft Website then the *.application will load and install without using the setup.exe at all.

Resources