Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Using ADO/OLE to Connect To Non-Local Datasource
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
01456946
Message ID:
01456950
Vues:
71
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--
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform