Hi
I'm new here so forgive me if this is the wrong board, might be to post in the Databases board but oh well.
So after hours of trying to connect to a Visual Foxpro data provider (thanks whoever made it this hard) I finally have a connection, but still cannot reach the table.
What I have:
a wamp server and php and adoDB for php package
under c:/wamp/www
I have a dbf.php
under c:/wamp/www/test
I have a dbf file called staru.DBF
Now I'm trying to connect to this from the dbf.php file:
Code:
<?php
$path = "adodb514/adodb5/adodb.inc.php";
$path2 = "adodb514/adodb5/adodb-exceptions.inc.php";
include($path);
include($path2);
try {
$conn = new COM("ADODB.Connection");
$conn->Open("Driver={Microsoft Visual FoxPro Driver};SourceType=DBF;SourceDB=c:\wamp\www\test\staru.DBF;Exclusive=No;BackgroundFetch=No;");
$rs = $conn->Execute("select * from staru");
while ($array = $rs->FetchRow()) {
print_r($array);
}
}
catch (exception $e) {
printf($e);
}
?>
What I get is:
Code:
exception 'com_exception' with message 'Source: Microsoft OLE DB Provider for ODBC Drivers
Description: [Microsoft][ODBC Visual FoxPro Driver]File 'staru.dbf' does not exist.' in C:\wamp\www\dbf.php:9 Stack trace: #0 C:\wamp\www\dbf.php(9): com->Execute('select * from s...') #1 {main}
Any ideas how to fix this? I'm on MS Server 2003
Thank you in advance