Php reads the dbf file VFP 9.0 generated by vfp8.0 and 9.0 PHP odbc
Thank you for your guidance...
The built-in Tabel Type> autoinc field or Blob field is a DBF file manufactured by VFP8.0 or later. do you want to read it through PHP?
The code is as follows:
$ Add = 'C: // BatMan // Daten // ladert2.dbf ';
$ E = "Driver = {Microsoft Visual FoxPro Driver}; SourceType = DBf; SourceDB = ". $ add. "; Exclusive = NO; collate = Machine; NULL = NO; DELETED = NO; BACKGROUNDFETCH = NO ;";
$ Odbc = odbc_connect ($ e ,'','');
Echo $ add;
$ Query = "select * from". $ add .";";
$ Result_id = odbc_do ($ odbc, $ query );
Odbc_result_all ($ result_id, "border = 1 width = 50% ");
Odbc_close ($ odbc );
?>
Error reported
C: // BatMan // Daten // ladert2.DBF
Warning: odbc_do (): SQL error: [Microsoft] [ODBC Visual FoxPro Driver] Not a table ., SQL state S0002 in SQLExecDirect in C: \ xampp \ htdocs \ dbf. php on line 7
File structure:
The ODBC driver is installed and then read in 8. 0 is the previous DBF file feasible, but there is no solution for the latest? Is the online odbc driver only for the old version?
I don't know what the best strategies are for the great gods?
Reply to discussion (solution)
Supplement...
Operating Environment: Apache 2.4.3, PHP 5.4.7, VFP 9.0, and ODBC driver .. Vfpodbc_German Version 1.0
Brother ?, Are you using PDO ?? ??
However, thank you for your reply ..
I have never touched on PDO before ..
I later tried to install the VFPOLEDB driver, and then used the adodb for link. some can connect to the returen value which is 0.3.48.50, but the autoinc field in 49 still does not work ..
The problem is fixed .. I found that I didn't start the COM + service in the Window service ..