Error using the Visual FoxPro OLE DB Provider from Visual Studio 2008 on 64-bit operating systems

Article translations Article translations
Article ID: 958338 - View products that this article applies to.
Expand all | Collapse all
Source: Microsoft Support

RAPID PUBLISHING

RAPID PUBLISHING ARTICLES PROVIDE INFORMATION DIRECTLY FROM WITHIN THE MICROSOFT SUPPORT ORGANIZATION. THE INFORMATION CONTAINED HEREIN IS CREATED IN RESPONSE TO EMERGING OR UNIQUE TOPICS, OR IS INTENDED SUPPLEMENT OTHER KNOWLEDGE BASE INFORMATION.

Action

You are developing an application using Microsoft Visual Studio 2008. Your application uses the Microsoft Visual FoxPro OLE DB Provider ("VFP Provider") to access Microsoft Visual FoxPro data. You compile this application, targeting "Any CPU" or "x64" in the build properties for the Microsoft Visual Studio 2008 project. You then run this application on a 64-bit operating system.

Result



When the application calls the VFP OLE DB Provider, the following error appears:

    "The 'VFPOLEDB.1' provider is not registered on the local machine."

Cause

While it is possible that the VFP provider is not installed on the machine, the more likely cause of this issue is that the Visual Studio application is running as a 64-bit process and because the VFP provider is a 32-bit DLL it is unable to access it.

Resolution



Alter the build properties of the Visual Studio project so that it's target platform is x86:

1. In the Solution Explorer, expand the project and then double-click the "Properties" node.
2. Click the "Build" tab.
3. Change the "Platform target" option to "x86" and then click "Save".
4. Recompile the project.

Doing this will ensure that your Visual Studio application will be able to access the 32-bit VFP provider when run on both x86 and x64 Windows platforms - the application will execute as a 32-bit process on both.

Note that if you choose "Any CPU" as the target platform in Visual Studio, the resulting application will run as a 32-bit process on 32-bit Windows, and will be able to use the VFP Provider just fine. However, when the same .EXE is run on 64-bit Windows, it will execute as a 64-bit process, and the problem described in the "Result" section above will occur.

More Information



Visit the following web site to download the Microsoft Visual FoxPro OLE DB Provider:

 http://msdn.microsoft.com/en-us/vfoxpro/bb190232.aspx

DISCLAIMER

MICROSOFT AND/OR ITS SUPPLIERS MAKE NO REPRESENTATIONS OR WARRANTIES ABOUT THE SUITABILITY, RELIABILITY OR ACCURACY OF THE INFORMATION CONTAINED IN THE DOCUMENTS AND RELATED GRAPHICS PUBLISHED ON THIS WEBSITE (THE “MATERIALS”) FOR ANY PURPOSE. THE MATERIALS MAY INCLUDE TECHNICAL INACCURACIES OR TYPOGRAPHICAL ERRORS AND MAY BE REVISED AT ANY TIME WITHOUT NOTICE.

TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW, MICROSOFT AND/OR ITS SUPPLIERS DISCLAIM AND EXCLUDE ALL REPRESENTATIONS, WARRANTIES, AND CONDITIONS WHETHER EXPRESS, IMPLIED OR STATUTORY, INCLUDING BUT NOT LIMITED TO REPRESENTATIONS, WARRANTIES, OR CONDITIONS OF TITLE, NON INFRINGEMENT, SATISFACTORY CONDITION OR QUALITY, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, WITH RESPECT TO THE MATERIALS.

Properties

Article ID: 958338 - Last Review: October 2, 2008 - Revision: 1.0
APPLIES TO
  • Microsoft Visual FoxPro 9.0 Service Pack 2
  • Microsoft Visual FoxPro 9.0 Service Pack 1
  • Microsoft Visual FoxPro 9.0 Professional Edition
  • Microsoft Visual FoxPro 8.0 Service Pack 1
  • Microsoft Visual FoxPro 8.0 Professional Edition
Keywords: 
kbnomt kbrapidpub KB958338

Give Feedback

 

Contact us for more help

Contact us for more help
Connect with Answer Desk for expert help.
Get more support from smallbusiness.support.microsoft.com