Dear All, I would like to access legacy Foxpro 2.6 free tables using ODBC from PHP.
My setup is on one single machine as follow: Windows XP Professional Apache Windows version 3.23.52 PHP 4.2.3 Windows version Visual Foxpro ODBC Driver Version 6.01.8629.01 First, I created a System DSN by the name of webdata which points to c:\web\data as a directory of free tables using XP's ODBC data source administrator. I tested the ODBC connection using Microsofy Excel and there is no problem. I then created test.php as follow: // test.php <?php odbc_close_all(); $id = odbc_connect( "webdata", "", "" ); if ( $id != 0 ) { echo "DSN webdata connected<br>"; echo "ID = ", $id, "<br>"; $resid = odbc_exec( $id, "select * from dblist" ); if ( $resid) odbc_result_all( $resid); } else { echo "Error connecting to DSN webdata"; } odbc_close_all(); ?> When I run the script, the following error output is returned: DSN webdata connected ID = Resource id #1 Warning: SQL error: [Microsoft][ODBC Visual FoxPro Driver]Cannot open file c:\web\data\dblist.dbf., SQL state S1000 in SQLExecDirect in c:\web\test.php on line 10 Since the same ODBC DSN can be accessed from other programs, is it possible that I have left out something when configuring PHP? Any assistance would be greately appreciated. -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php