"Syntax Error in expression" strange error

"Syntax Error in expression" strange error

Post by Romano Signorel » Sat, 13 Apr 1996 04:00:00



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".


 
 
 

"Syntax Error in expression" strange error

Post by Romano Signorel » Sat, 13 Apr 1996 04:00:00


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".



 
 
 

"Syntax Error in expression" strange error

Post by Timothy Johnso » Sun, 14 Apr 1996 04:00:00


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

 
 
 

1. Error "Full dBase expressions not allowed"

I have been having problems with accessing a dBase file
on a mapped drive. Everytime I try, I get the message
"Full dBase expressions not allowed". Is this some part
of the BDE that has been handcuffed since I don't have
the full client/server version?

2. odbc and memo field truncate.

3. Strange "File not found" error

4. PROGRESS JOBS

5. SqlServer Datetime field to time_t

6. Strange error "PK__@snapshot_seqnos__62A26167"

7. Help with sql statement

8. strange xp_cmdshell "Dtsrun ......" timeout error

9. Strange "File not found" error

10. MySQL - "NOT IN" syntax error

11. linked servers "Error Incorrect Syntax near.."

12. ADO "syntax error in FROM clause"