使用Visual福克斯临OleDb的工作 [英] Working with the Visual Fox Pro OleDb

查看:110
本文介绍了使用Visual福克斯临OleDb的工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想从DBF文件数据拉入使用C#我的程序。我使用Visual FoxPro OLE DB提供程序。它工作正常,我的本地机器上,但我想我的程序打包成DLL,客户端可以使用。问题是,当他们从他们的计算机上运行程序它说,Visual FoxPro的OLE DB提供程序未注册他们的机器上。有没有什么办法可以使用此无需在客户端安装他们的计算机上的Visual FoxPro OLE DB提供程序?

I am trying to pull data from DBF files into my program using C#. I am using the Visual FoxPro OLE DB Provider. It works fine on my local machine but I want to package up my program into dll that clients can use. The problem is when they run the program from their machine it says that the Visual FoxPro OLE DB Provider isn't registered on their machine. Is there any way to use this without having the client install the Visual FoxPro OLE DB Provider on their machine?

推荐答案

简短的回答没有... ...长的答案是:

The short answer is no...the long answer is:

我不相信你可以做,没有每个目标计算机上安装Visual FoxPro的OLE DB提供程序。即使您尝试使用COM互操作,你仍然要安装和注册原始的dll文件 - vfpoledb.dll

I don't believe you can do that without installing the Visual FoxPro OLE DB Provider on each target machine. Even if you tried to use COM interop you would still have to install and register the original dll - vfpoledb.dll

到目前为止,解决这一问题的最简单方法是是获得的FoxPro OLEDB驱动程序安装包微软和其分发给您的用户。

By far the easiest way to solve this issue is is to get the FoxPro OleDb Driver install package from Microsoft and distribute it to your users.

如果你想推出自己的.MSI包为您库安装您可以手动安装和注册。缺少DLL

If you are want to roll your own .MSI package for your library installation you can manually install and register the missing dll.

要在.MSI包使用Regsvr32.exe手动注册.dll:

To manually register a .DLL using regsvr32.exe in a .MSI package:

第一打开您的WSI项目,并进入MSI脚本。

First open your WSI project and go to the MSI Script.

添加InstallFinalize后自定义操作中执行即时标签,从目标执行计划。

Add an 'Execute Program from Destination' custom action after InstallFinalize in the Execute Immediate tab.

在该执行程序从目的地对话框出现时输入:

When the 'Execute Program From Destination' dialog appears enter:

Custom Action Name: <registerdll>
Working Directory: SystemFolder
EXE and Command Line: Enter the full path to regsvr32.exe 
and the full path to .DLL.

(usually ..\Program Files\Common Files\System\Ole DB\vfpoledb.dll)

如果您使用/ s开关添加到像[SystemFolder]的regsvr32.exe / s时的dll应该发生的,无需用户干预的注册。

If you add the /s switch to the command line like [SystemFolder]regsvr32.exe /s the registration of the dll should happen without user intervention.

这篇关于使用Visual福克斯临OleDb的工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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