Php reads the dbf files generated in vfp8.0 and 9.0.

Source: Internet
Author: User
Tags sql error
Php reads the dbf file generated by vfp8.0 and 9.0... DBF files manufactured by VFP8.0 or above, built-in Tabel & nbsp; Type & gt; & nbsp; autoinc & nbsp; field & nbsp; or Blob & nbsp; field, to read the dbf files generated by vfp 8.0 and 9.0 through PHP
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? VFP? 9.0 ?? PHP odbc shared :? Autoinc? Field? Or Blob? Field. I want to read data through PHP. isn't it? The code is very simple, such as... 'data-pics = '/img/2013/07/20/114834563 .png'>
------ Solution --------------------
Hey, are you using PDO again?

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.