简体   繁体   中英

Connect to Foxpro with PHP using OLE DB driver

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.

As requested

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM