Subject why do I not get a result set
Author Grant Brown
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.

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;
while not EOF do
begin
R := T;
T := T + 1;
SetLength(TempArray, T);
TempArray[R].ID :=
Get_DataListItems.FieldByName('DETECTID').AsInteger;
TempArray[R].Item :=
Get_DataListItems.FieldByName('ITEM001').AsString;
MyList.Items.Add(TempArray[R].Item);
Next;
end;
Transaction.Commit;
except
begin
Transaction.Rollback;
raise;
end;
end;
end;

--
Regards,
Grant Brown

Product Development Manager
Phone : 02 4229 1185
Mobile : 0412 926 995
Email : grant@...
Web : www.sitedoc.com.au

SiteDoc - Easy to Use - Powerful Results