使用OLE DB驱动程序通过PHP连接到Foxpro [英] Connect to Foxpro with PHP using OLE DB driver

查看:125
本文介绍了使用OLE DB驱动程序通过PHP连接到Foxpro的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用OLE DB驱动程序连接到Foxpro数据库

I'm trying to connect to a Foxpro database using the OLE DB Driver

我从 http://www.microsoft下载了驱动程序.com/en-us/download/details.aspx?id = 14839 并安装它,然后创建一个php脚本

I downloaded the driver from http://www.microsoft.com/en-us/download/details.aspx?id=14839 and installed it then create a php script

$conn = new COM("ADODB.Connection") or die("Cannot start ADO");
$conn->Open("Provider=vfpoledb.1;Data Source=C:\Opera3\Comp_I.DBC;Collating Sequence=machine");

这给了我以下错误

Fatal error: Uncaught exception 'com_exception' with message '<b>Source:</b> ADODB.Connection<br/><b>Description:</b> Provider cannot be found. It may not be properly installed.' in C:\inetpub\wwwroot\test1.php:4 Stack trace: #0 C:\inetpub\wwwroot\test1.php(4): com->Open('Provider=vfpole...') #1 {main} thrown in C:\inetpub\wwwroot\test1.php on line 4

在此方面的任何帮助将不胜感激.

Any help in getting this working would be much appreciated.

推荐答案

根据要求

以管理员身份针对所有用户从命令行卸载并重新安装,现在可以使用–

uninstalled and reinstalled from command line as administrator for all users and now it works –

这篇关于使用OLE DB驱动程序通过PHP连接到Foxpro的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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