Subject Re: [firebird-support] why do I not get a result set
Author Magnus Titho
Grant Brown schrieb am 19.04.2005 09:23:
> Hi all,
>
> Using the following query I only seem to get a record count of 1 when I
> know the number of records in the database is 5.

Unless you don't go to the last record of the query
(Get_DataListItems.Last;), "recordcount" reports wrong results.
But "while not eof" should work nonetheless.

>
> Also the result set does not enter the while not EOF loop and hence I
> can not get at the data returned.
>
> Any help please.
>
> // SELECT DETECTID, ITEM001 FROM D_LIST_HEAD WHERE DATATYPE = :IDno
>
> with Get_DataListItems do
> begin
> try
> Transaction.StartTransaction;
> Prepare;
> Params[0].Value := IDNo;
> ExecQuery;

Try "Open" instead of "ExecQuery"


--
Magnus