Not sure if this if the right Forum/Category, but here goes...
I am using PHP to access a table in a foxpro database using the following code:
<?php
$conn = new COM("ADODB.Connection");
$conn->Open('Provider=VFPOLEDB.1;Data Source=c:\saturn\data\saturn.dbc;Collating Sequence=MACHINE');
// SQL statement to build recordset.
$lc_sql="SELECT * FROM CLMAST where cl_company=[B] order by cl_name";
$rs = $conn->Execute($lc_sql);
echo "<p>List of Saturn Customers:</p><hr>";
// Display all the values in the records set
while (!$rs->EOF) {
$fv = $rs->Fields("cl_name","cl_code");
echo $fv->value."<br>\n";
$rs->MoveNext();
}
$rs->Close();
?>
This works perfectly, the problem occurs when I try to access the live database which resides on a different server, i.e.:
$conn->Open('Provider=VFPOLEDB.1;Data Source=\\SDMS-FINANCE\data\softwaresaturn\data\saturn.dbc;Collating Sequence=MACHINE');
When I try this, I get the following error message:
Fatal error: Uncaught exception 'com_exception' with message '<b>Source:</b> Microsoft OLE DB Provider for Visual FoxPro<br/><b>Description:</b> Invalid path or file name.' in C:\Inetpub\wwwroot\tssapi\connect.php:3 Stack trace: #0 C:\Inetpub\wwwroot\tssapi\connect.php(3): com->Open('Provider=VFPOLE...') #1 {main} thrown in C:\Inetpub\wwwroot\tssapi\connect.php on line 3
Any help would be greatly appreciated!
TIA
Kevin