Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Using ADO/OLE to Connect To Non-Local Datasource
Message
 
To
All
General information
Forum:
Visual FoxPro
Category:
Other
Title:
Using ADO/OLE to Connect To Non-Local Datasource
Miscellaneous
Thread ID:
01456946
Message ID:
01456946
Views:
242
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
Kevin Delaney
Financial Systems Manager
CPL Solutions Ltd

83 Merrion Square, Dublin 2, Ireland.
e: kevin.delaney@cpl.ie w: www.cpl.ie
p: +353 1 482-5368
Next
Reply
Map
View

Click here to load this message in the networking platform