Subject Re: [IBO] How To Know, Whether TIB_DSQL has returned any records or not ?
Author IB Objects
> while using select statement with TIB_DSQL is ther any way to know that it
> has returned any records or not
>
> i m getting an following error if my select doesnt return any records
> and if i use RowsSelected
>
> "SELECT GROUPID FROM GROUPINFO WHERE GROUPNAME = ?AGroupName"
>
>
> ISC Error Code = 335544374;
> Error message = "attempt to fetch past the last record in a record
stream";

TIB_DSQL is an ideal component for doing this kind of select now that the
bug in InterBase that caused problems doing this is fixed in Firebird.

If it succeeds without an exception then you are assured that it fetched one
and only one record.
Not zero and not more than one.

When using TIB_DSQL it performs a singleton select rather than a cursor
based select, therefore it is more efficient since a cursor doesn't have to
be created on the server.

Jason Wharton