Single field , multi-record Data-aware control

129 views Asked by At

I trying to create a data-aware component that is a single field , multi-record control , something like TDBLoookupList , but with the KeyField only. I cannot figure how to iterate through the dataset correctly .

 private  
   FFieldDataLink:TFieldDataLink;
   FDataList:Tlist;

 if FFieldDataLink.DataSet.Active and (FFieldDataLink.FieldName<>'' ) then
 begin
   try
      FFieldDataLink.DataSet.GetFieldList(FFDataList,FieldDataLink.FieldName);
   except  
     DatabaseErrorFmt(SFieldNotFound, [Self.Name,FFieldDataLink.FieldName]);
   end;
 end;

the above code snippet should return a list of the fields in the buffer, but it returns only the first record .

thanks

0

There are 0 answers