SQL statement used by PHP to link the DBF file

Source: Internet
Author: User
Tags sql error
SQL statement used by PHP to link the DBF file php odbc dbf

Ask the gods ..

After the odbc driver is installed, the link to the DBF file is OK ..
When using SQL statements, why can only use the most basic SQL syntax, such as SELECT... ORDER... like or GETDATE? Otherwise, the operation form is incorrect .. Otherwise, do not save this function.
[Microsoft] [ODBC Visual FoxPro Driver] File 'getdate. prg' does not exist.

Function argument value, type, or count is invalid.

I used MSSQL and MYSQL in the past .. Does the syntax change a lot when I use odbc functions to read SQL statements?
Please help me ..


Reply to discussion (solution)

Paste your SQL statement

You cannot use a non-existent function?

Yes, but I use the most basic SQL statement. isn't that true?

Select
Ifahrzeug,
Ttimestamp,
GETDATE ()
From c: \ BatMan \ Daten \ histwech. dbf
Where iwechselnr> 1
And ifahrzeug> 0
And naktion> 0
And naktion <4
And ifahrzeug like '123'
Order by ttimestamp desc;

Warning: odbc_exec () [function. odbc-exec]: SQL error: [Microsoft] [ODBC Visual FoxPro Driver] File 'getdate. prg' does not exist ., SQL state S0002 in SQLExecDirect in C: \ AppServ \ www \ batman \ batmanliste. php on line 54

Warning: odbc_exec () [function. odbc-exec]: SQL error: [Microsoft] [ODBC Visual FoxPro Driver] Function argument value, type, or count is invalid ., SQL state 37000 in SQLExecDirect in C: \ AppServ \ www \ batman \ batmanliste. php on line 53

Great God, can Basic SQL statements or functions be used in MSSQL, MYSQL, and VFP?

GETDATE () is a function of SQL server. it cannot be used in vfp.

O... amount ..
Now that I have installed the ODBC driver, do I have to write SQL statements based on VFP specifications in PHP?

Isn't the basic syntax like this?

You are accessing the vfp Database. of course, you must meet the vfp requirements.
Like is supported
Date (), time (), datetime () are supported

Isn't it necessary to learn another database language.

Okay. let me try again to see if the VFP language can be used .. ..

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.