Connect a Fox Pro DBF file with VFPOLEDB using php
I try to open a DBF file with php:
<?php $conn = new COM("ADODB.Connection") or die("Cannot start ADO");
$conn->Open("Provider=VFPOLEDB.1; Data Source=C:\XAMPP\HTDOCS\DBF\COMMESSE.DBF; Collating Sequence=machine;");
$rs = $conn->Execute("SELECT * FROM COMMESSE");
But I get this error:
"Fatal error: Uncaught exception 'com_exception' with message 'Source: Microsoft OLE DB Provider for Visual FoxPro. Description: Invalid path or file name."
If I put the php file in the same directory of the DBF file and I leave Data Source blank ("Provider=VFPOLEDB.1; Data Source=; Collating Sequence=machine;"), I get the error:
"Feature is not available"
Could anyone help me?
I've tried with dbase class of php, but it reads only few colums of the file.