Connect to Foxpro with PHP using OLE DB driver

别等时光非礼了梦想. 提交于 2019-12-08 09:16:42

问题


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

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");

This gives me the following error

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.


回答1:


As requested

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



来源:https://stackoverflow.com/questions/11247913/connect-to-foxpro-with-php-using-ole-db-driver

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!