Subject | Re: [IBO] Generate For Table (update sql in TIB_Query) |
---|---|
Author | radevojvodic |
Post date | 2007-06-26T13:07:07Z |
Well, it works ok with no aliases but if i put an alias it generates
wrong SQL.
I have tried it with DELPHI 7, DELPHI 2007, IBO 4.7 BUILD 16, IBO 4.8
TEST, iNTERBASE 7.0, FIREBIRD 2.01. No difference at all.
Rade
wrong SQL.
I have tried it with DELPHI 7, DELPHI 2007, IBO 4.7 BUILD 16, IBO 4.8
TEST, iNTERBASE 7.0, FIREBIRD 2.01. No difference at all.
Rade
--- In IBObjects@yahoogroups.com, Helen Borrie <helebor@...> wrote:
>
> At 04:45 PM 26/06/2007, you wrote:
> >I have a simple query
> >
> >SELECT B.BANKA_ID
> >FROM BANKA B
> >
> >KeyRelation = B
>
> This doesn't belong (there are no joins and it is not valid to put a
> relation alias in that property, anyway)
>
> But the parser should either ignore it (because it does not apply) or
> it should complain, with an exception.
>
> >KeyLinks = BANKA_ID
>
> That should be OK, provided it is unique in your set.
>
>
> >Button Generate forTable in UpdateSQL tab in TIB_Query Editor
> >generates following SQL.
> >
> >EDIT:
> >
> >UPD TE SET
> >WHERE
> >RDB$DB_KEY = :DB_KEY
> >
> >
> >
> >INSERT:
> >
> >INSER) INTO (
> >VALUES )
> >
> >
> >DELETE:
> >
> >DELETE FROM
> >WHERE
> >RDB$DB_KEY = :DB_KEY
> >
> >
> >What am i doing wrong (it is the same for interbase7.0 or firebird2.0)
>
> As mentioned; but invalid properties should not generate garbage
> SQL, or ignore a good Keylink. What I think is *happening* with the
> parser is that your KeyRelation setting is making it think it has to
> deal with two tables and it has no KeyLinks that fit any table
named "B".
>
> What build of IBO are you using? I wonder if you are trying to use
> that 4.8 test build that Jason put up in the Trustware repository for
> me at the weekend to test a bug-fix? (It didn't work....)
>
> Helen
>