PHP DBF CDX
PHP Read folder under DBF file, if the same name as the CDX file exists, read no problem,
However, if only the independent DBF file, read through PHP, the error is as follows:
$add = ' C://batman//daten//ladertyp. DBF ';
$e = "Driver={microsoft Visual FoxPro Driver}; SOURCETYPE=DBF; Sourcedb= ". $add."; ";
$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);
?>
The error is as follows:
C://batman//daten//ladertyp. 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 9
Warning:odbc_result_all () expects parameter 1 to BES resource, boolean given in C:\xampp\htdocs\dbf.php on line 10
May I ask the following: What's the reason? And how to solve it??
Reply to discussion (solution)
Sorry, just tested another file, only dbf file, but no CDX file, with the same instructions can be opened.
The problem is not estimated under the CDX file. What would be the problem?
Seek the guidance of the Great God!! It's a nasty death.
CDX file is a dbf inline index file
If it had been, then deleted, then DBF will not open
You can build an empty file to impersonate
Thank you very much for replying so soon.
I tested the next, or not. The same error.
What would happen if it weren't for CDX?
Find out why. Because the DBF file type is different, the VFP version used is different, and ODBC can support up to 7
Later, OLE DB driver with ADODB plus VFP can be connected.