获取错误“'VFPOLEDB.1'提供程序未在本地机器上注册”即使在安装和注册提供程序后 [英] Getting the error "The 'VFPOLEDB.1' provider is not registered on the local machine" even after installing and registering the provider

查看:2143
本文介绍了获取错误“'VFPOLEDB.1'提供程序未在本地机器上注册”即使在安装和注册提供程序后的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

好的,所以我有一个Windows服务,它有一个 FileSystemWatcher ,监视一些Visual FoxPro数据库文件的输出文件夹。并且它利用 VFPOLEDB.1 提供程序来读取这些文件。 我无法离开此提供商,因为它正在生产中使用。

Alright, so I've got a Windows service that has a FileSystemWatcher that watches an output folder for some Visual FoxPro database files. And it leverages the VFPOLEDB.1 provider to read those files. I cannot go away from this provider because it's being used in production.

但是,我从来没有必要支持此应用程序为什么我的开发盒没有为它设置。这是我的环境:

However, I've never had to support this application before so that's why my development box isn't setup for it. Here is my environment:


  • Windows 7 x64

  • Visual Studio 2005

  • .NET 2.0 Windows服务

所以,当我第一次开始得到错误,我想我只是没有提供者,我是对的。所以,我下载并安装了从这里

so, when I first started getting the error I figured I just didn't have the provider at all, and I was right. So, I downloaded and installed it from here.

然后我再次删除文件夹中的文件,但我收到了同样的错误。

I then proceeded to drop the files in the folder again, but I got the same error.

我想,因为它是一个 x64 机器我可能遇到问题,它得到注册,因为它可能会被放入 SysWOW64 ,它是按照我的预期,所以我运行这个命令:

I figured because it's an x64 machine I might be experiencing problems with it getting registered since it was probably dropped into SysWOW64, and it was as I expected, so I ran this command:

regsvr32 "C:\Windows\SysWOW64\mscomct2.ocx"

,表示它已成功注册关于没有LOL),但我再次删除了文件 - 同样的错误。

and it said it was successfully registered (which means about nothing LOL) but I dropped the files in again - same error.

我还没有重新启动我的机器,有一个令人信服的原因是问题,但一般来说,如果程序集注册正确与 regsvr32 ,这是不必要的。我已经使用了的COM对象,只要我已经注册它就不必重新启动就可以访问对象。

I have not yet rebooted my machine, and I can if somebody has a compelling reason that's the problem, but generally speaking if the assembly is registered properly with regsvr32 that's not necessary. I've worked with a ton of COM objects and never have to reboot to get to the object as long as I've registered it.

有没有人知道我需要执行其他步骤才能注册此项?

推荐答案

注册为它应该。它是为AnyCPU平台编译的应用程序。

在x64操作系统中,这产生64位代码,64位代码无法访问32位驱动程序。

It is registered as it should. It is your application that is compiled for AnyCPU Platform.
In x64 operating system this produces 64bit code and 64bit code could not access 32bit drivers.

将您的平台更改为x86,就可以了。

Change your Platform to x86 and you will be fine.

EDIT

两年后,这个答案。现在,在Visual Studio 2013中,奶酪已移动。文章链接详细解释了编译器设置默认值是如何改变的。 AnyCPU 目标CPU与首选32位意味着您的应用程序也在32位应用程序也在x64bit操作系统, -room到x64应用程序,除非特别要求。

EDIT
Two years later there is something to add to this answer. Now with Visual Studio 2013 the cheese has been moved. The article linked explain in great details how the compiler setup defaults has been changed. The AnyCPU target CPU with Prefer 32 bit means that your application works as 32bit app also in x64bit operating systems leaving practically no-room to x64 application unless specifically required.

使用这个新配置也很重要,以便记住Mark Berry在下面的评论中发布的内容。如果你的(现在的32位)应用程序需要在IIS 64位的环境中工作,你需要设置应用程序池启用32位应用程序

With this new configuration becomes also important to remember what is posted in comments below by Mark Berry. If your (now 32bit) app needs to work in a IIS 64bit environment you need to set the Application Pool with Enable 32 bit Applications

这篇关于获取错误“'VFPOLEDB.1'提供程序未在本地机器上注册”即使在安装和注册提供程序后的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆