Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Using ADO/OLE to Connect To Non-Local Datasource
Message
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
01456946
Message ID:
01456950
Views:
70
Hi Kevin,

Most likely it's permission issue. The account your PHP runs under has to have access to other server and folder where VFP tables are located.

>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:
>
--sb--
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform