"Syntax Error in expression" strange error 
Author Message
 "Syntax Error in expression" strange error

In my directory "c:\pietro\user" i have a table named "ORDINI.DB"
created with DataBase Desktop.
I have a form with a query component and a TField component.
I have wrote  this query:
        SELECT *
        FROM "C:\pietro\user\Ordini.Db"
        WHERE Ordini."Data Ordine" > :DataOrdineInizio
It's a dinamic query where "Data Ordine" is a field of the table.
Into the code of the form i have this istructions:
        on create event - QueryOrdini.Create;
        on onClik event - QueryOrdini.Close;
                          QueryOrdini.ParamByName('DataOrdineInizio').AsDate := 01/01/96;
                          QueryOrdini.Open;
where QueryOrdini is the name of my Query.
Always i have the error "Syntax Error in expression. Field : Data
Ordine. Table : c:\pietro\user\ordini.db: Image 2".




Tue, 29 Sep 1998 03:00:00 GMT  
 "Syntax Error in expression" strange error
In my directory "c:\pietro\user" i have a table named "ORDINI.DB"
created with DataBase Desktop.
I have a form with a query component and a TField component.
I have wrote  this query:
        SELECT *
        FROM "C:\pietro\user\Ordini.Db"
        WHERE Ordini."Data Ordine" > :DataOrdineInizio
It's a dinamic query where "Data Ordine" is a field of the table.
Into the code of the form i have this istructions:
        on create event - QueryOrdini.Create;
        on onClik event - QueryOrdini.Close;
                          QueryOrdini.ParamByName('DataOrdineInizio').AsDate := 01/01/96;
                          QueryOrdini.Open;
where QueryOrdini is the name of my Query.
Always i have the error "Syntax Error in expression. Field : Data
Ordine. Table : c:\pietro\user\ordini.db: Image 2".




Tue, 29 Sep 1998 03:00:00 GMT  
 "Syntax Error in expression" strange error
I believe your problem is related to the quotes you are using to specify
 the field name where you want to perform your selection criteria.  
Borland's SQL is reading it incorrectly.  I can't explain why you should
do what I am suggesting, but I know I had the problem, and make the
suggested correction to my code, and it worked.  If it doesn't work,
please let me know, either way.

Instead of
  SELECT *
         FROM "C:\pietro\user\Ordini.Db"
         WHERE Ordini."Data Ordine" > :DataOrdineInizio

Try
        SELECT *
        FROM "C:\pietro\user\Ordini.Db" d
        WHERE d."Data Ordine > :DataOrdineInizio



Wed, 30 Sep 1998 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Error "Full dBase expressions not allowed"

2. The keys "-"/"+"/"*"

3. "Error Creating Cursor Handle"

4. "File is Locked" error message

5. "Directory Busy" BDE error

6. "Missing comma" error with SQL statement

7. BDE Setup Error "Object Not Found"

8. "I/O error in FILEIO.DLL"

9. "Index is out of date" error

10. "Invalid Char in Field" error

11. HELP: "Error in Symbol File" message

 

 
Powered by phpBB® Forum Software