Subject Re: statement Union in a TIBO_Query
Author Marco Menardi
--- In IBObjects@yahoogroups.com, "Vahan Yoghoudjian" <vahan@p...> wrote:
> I'm using a TIBO_Query to run the following SQL statement
>
> SELECT CODE,NAME FROM CLIENTS
>
> UNION
>
> SELECT CODE,NAME FROM OPERATORS
>
> and I'm getting the following Error Message:
>
>
----------------------------------------------------------------------------
> ---
> ISC ERROR CODE: 335544569
> ISC ERROR MESSAGE:
> Dynamic SQL error code = -104
> Invalid Command
> Data Type Unkown
>
> STATEMENT:
> TIBOInternalDataset: "DataModuleForm.DModule.QrSearch.
> <TIBOInternalDataSet>."
>
----------------------------------------------------------------------------
> ----
>
> The same statement works fine in a TQuery, does TIBO_Query support
the UNION
> statement or I'm doing something wrong?

Well, seems that you get the error using the search capability of
TIBO_Query, instead of simply "opening" it.
In addition, I don't remember exactly, but for "OrderingItemNo"
property or stuff like this that implies IBO to parse the SQL
statement and add some piece, the UNION clause confused the parser, so
you can't use it.
Try with the help of the IB_Monitor component to see what is sent by
IBO to the server, and deduce what is wrong (or made wrong by IBO
parser confused by UNION).
regards
Marco Menardi