Hi Guys,
Found a bunch of stuff which was really close to what I was looking for but couldn't quite get it to work...
Am trying to connect to a remote datasource using the Microsoft Visual FoxPro Driver...
Here's the code
<?php
$myDSN = "DRIVER={ODBC Visual FoxPro Driver};SERVER=203.12.160.35;DATABASE=DATA";
$connect = odbc_connect("$myDSN","USER","PASSWORD") or die("Couldn't connect to datasource.");
//--form query statement
$query = "SELECT * FROM table";
$result = odbc_exec($connect, $query);
while ($row = odbc_fetch_array($result))
{
echo "row[field]";
}
odbc_close($connect);
?>
Getting this error
Warning: odbc_connect() [function.odbc-connect]: SQL error: [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified, SQL state IM002 in SQLConnect in C:\webroot\website\test.php on line 4
Couldn't connect to datasource.
Any idea's?? Can this be done?
Thanks heaps for any help in advance.