Board index » delphi » Invalid use of keyword!

Invalid use of keyword!

I'm getting an edbEngine Error 'Invalid use of keyword: token
left(zip,5) ' with the following code:

------
 with qAddressFix do begin
  SQL.strings[1] := 'where left(zip,5) = '''+mzipcode+''' and
city = '''+mcity+''' ';
  SQL.strings[2] := 'order by address_1';
  open;
 end;
------
I cut and paste the exact same SQL and it runs fine in ISQL.
It seems that the BDE or ODBC doesn't like the syntax used by
Sybase SQLAnywhere.

What can I do to fix this problem, am I missing something?
All my other tquery SQL's work fine.

 

Re:Invalid use of keyword!


Try to change left(zip,5) to substr(zip,1,5)...

[]s
Arthur

Mike Packard <mpack...@adnc.com> escreveu nas notcias de mensagem:3B687759.90B9...@adnc.com...

Quote
> I'm getting an edbEngine Error 'Invalid use of keyword: token
> left(zip,5) ' with the following code:

> ------
>  with qAddressFix do begin
>   SQL.strings[1] := 'where left(zip,5) = '''+mzipcode+''' and
> city = '''+mcity+''' ';
>   SQL.strings[2] := 'order by address_1';
>   open;
>  end;
> ------
> I cut and paste the exact same SQL and it runs fine in ISQL.
> It seems that the BDE or ODBC doesn't like the syntax used by
> Sybase SQLAnywhere.

> What can I do to fix this problem, am I missing something?
> All my other tquery SQL's work fine.

Re:Invalid use of keyword!


Mike,

  Are you using RequestLive?  I've seen the BDE get picky with
"non-standard" SQL with live result sets.  For more info, go to
http://www.fulltextsearch.com/ and search on your message.

Good luck,
krf

Quote
Mike Packard <mpack...@adnc.com> wrote in message

news:3B687759.90B9512@adnc.com...
Quote
> I'm getting an edbEngine Error 'Invalid use of keyword: token
> left(zip,5) '

Re:Invalid use of keyword!


Quote
>> Are you using RequestLive?

Yes, the BDE is very picky about what it considers "non-standard"
with "live".

My solution was to use like 'zip%'.

I just _have_ to get rid of that stupid BDE!

Re:Invalid use of keyword!


MIDAS

http://community.borland.com/article/0,1410,22571,00.html

Good luck,
krf

Quote
Mike Packard <mpack...@adnc.com> wrote in message

news:3B6B1AAD.3334F4E0@adnc.com...
Quote

> I just _have_ to get rid of that stupid BDE!

Other Threads