Subject Re: [IBO] Problem-DSQL-with-singleton-select
Author Helen Borrie
At 10:34 AM 18/08/2004 +0000, you wrote:
> > It is. For TIB_DSQL:
> >
> > "This component is used for all InterBase DSQL statements that do
> > not involve the handling of multiple rows of output data.
>It didn't "involve the handling of multiple rows of output data".
>It involved no output data. The select returned an empty result-set.

SELECT, by design, returns 0-to-many rows in any situation except a scalar
subquery. So, for a SELECT statement, you use a component designed to
handle multiple rows, even if *you* know that the statement won't return
any rows. The database engine doesn't know about it and the TIB_DSQL will
complain about it. In my previous message I tried to explain to you how
the bare TIB_Statement (of which TIB_DSQL is the implementation) handles
input and output parameters. Singleton sets (one and only one row), aka
return parameters, are the only "fields" that TIB_Statement knows about.

>If you are suggesting that by reading that explanation you understand
>that you will get an AV when you use a select that returns an empty
>result-set I agree with you: the help really helps.
>The problem is I didn't understand that. It must be my poor
>understanding of english language.

Your English seems fine to me; but your understanding of SQL concepts and
Delphi component hierarchies seems to want some work. For better or worse,
IBO's help text can't teach you the concepts of SQL or Delphi. It takes an
8.5 Mb helpfile just to document IBO's characteristics.

FYI, because IBO implements the Firebird and InterBase API very thoroughly,
it can be very useful to study the API Guide and understand what's actually
going on down there. "Useful", I said, not "essential", since you seem
like an intelligent person, albeit one who wants to run before he really
knows how to walk...

Helen