Board index » delphi » Invalid Use of Keyword

Invalid Use of Keyword

I have an app that needs to delete a user in Oracle.

The statement is:
Drop User shmoe Cascade

When I chuck this into a TQuery and execute it, I get the following error:
Invalid use of Keyword
Token: user
Line Number 1

Any idea how to get areound this?

Thanks

 

Re:Invalid Use of Keyword


Marty,

   Don't forget to set the DatabaseName property of the TQuery and use the
ExecSQL method.

Good luck,
krf

Quote
Marty Cullen wrote in message <92g71f$2...@bornews.inprise.com>...
>I have an app that needs to delete a user in Oracle.

>The statement is:
>Drop User shmoe Cascade

>When I chuck this into a TQuery and execute it, I get the following error:
>Invalid use of Keyword
>Token: user
>Line Number 1

>Any idea how to get areound this?

>Thanks

Re:Invalid Use of Keyword


"Marty Cullen" <Marty.Cul...@DataDynam.Com> wrote

Quote
> I have an app that needs to delete a user in Oracle.

> The statement is:
> Drop User shmoe Cascade

> When I chuck this into a TQuery and execute it, I get the following error:
> Invalid use of Keyword
> Token: user
> Line Number 1

    You need to set proper alias name in the TQuery.DatabaseName property --
from an exisiting alias or setup a TDatabase component and give its alias
name. If you dont do either of these, the SQL is executed locally using the
STANDARD driver.

-- Reddy Palle.

Re:Invalid Use of Keyword


Thanks,
That falls under the "DUH" category

bad cut and paste....

Quote
"Reddy" <pvre...@rocketmail.com> wrote in message news:3a4ba4d1$1_2@dnews...

> "Marty Cullen" <Marty.Cul...@DataDynam.Com> wrote
> > I have an app that needs to delete a user in Oracle.

> > The statement is:
> > Drop User shmoe Cascade

> > When I chuck this into a TQuery and execute it, I get the following
error:
> > Invalid use of Keyword
> > Token: user
> > Line Number 1

>     You need to set proper alias name in the TQuery.DatabaseName
property --
> from an exisiting alias or setup a TDatabase component and give its alias
> name. If you dont do either of these, the SQL is executed locally using
the
> STANDARD driver.

> -- Reddy Palle.

Other Threads