Subject Re: Storing query results in variables
Author Svein Erling Tysvær
--- In, "yaedos2000" wrote:
> Hi,
> Can the result of a TIB_Query be stored straight to a variable? I'm
> using the query SELECT HACID FROM HACS to get a list of ID numbers,
> and I can store the first item with the expression:
> linked_list^.id := Query.Fields.Values['HACID'];
> linked_list := lined_list^.next;
> I'm using a linked list to store the ID numbers, as the number of
> data items is not known at design time. As the above expression only
> obtains the first ID number, how would any other ID numbers be
> obtained?

use Query.Next to go to the next record and once you reach Query.Eof
there is nothing more. By the way, using a TIB_Cursor is better if you
only want to go through these records once from beginning to end.