Board index » delphi » Invalid use of keyword error

Invalid use of keyword error

I have a TQuery component with the following SQL statement assigned to it:

   Select column1
   From user1.Table1
   Where column2 = 2

If the RequestLive property of this component is set to FALSE, everything
works fine when Active is set to TRUE. However, I received the following
error on setting Active to TRUE when the RequestLive property has been
set to TRUE:

   Project project1 raised exception class
   EDBEngineError with message
   'Invalid use of keyword token
    .Table1 Where'

I need a live result set with this SQL statement. It this a Delphi 1
limitation?

I am using Delphi 1 and an Oracle7 RDBMS.

Thanks.

chuahtc

 

Re:Invalid use of keyword error


CHUA...@sam.po.my (Chuah Teik Chye) wrote:

Quote

> I have a TQuery component with the following SQL statement assigned to it:

>    Select column1
>    From user1.Table1
>    Where column2 = 2

> If the RequestLive property of this component is set to FALSE, everything
> works fine when Active is set to TRUE. However, I received the following
> error on setting Active to TRUE when the RequestLive property has been
> set to TRUE:

>    Project project1 raised exception class
>    EDBEngineError with message
>    'Invalid use of keyword token
>     .Table1 Where'

> I need a live result set with this SQL statement. It this a Delphi 1
> limitation?

> I am using Delphi 1 and an Oracle7 RDBMS.

This is the clue. For some reason, you have to type your statement all
uppercase when talking to Oracle. Surround user1.table1 by single
quotes and all should work as expected.

        SELECT COLUMN1 FROM 'USER1.TABLE1' WHERE COLUMN2=2

Have fun!

Jasper

Other Threads