tags:

views:

62

answers:

0

hello, I want to gets a list of objects from DB, I using a DAO component. I can get one object but now I need getting a list of objects, I'm new in delphy and don't know how to process to get this list.

Note that I use delphi 7.

this is how I get one record through DAO.

// Get persons from DB
    iNbRecordFound := myPersonDAO.Find(IEntityObject(myPerson));

// test the number of records found
if (iNbRecordFound = 0) then
  Raise Exception.Create('No person found for date: ' + DateTimeToStr(aDate))
else
begin
  // Return the found person
  Result := myPerson;

  // getting list of persons.
  if (iNbRecordFound > 1) then
  begin
    // Here I need to fill list of persons
    myPersonList := ...
  end;
 end;

Thank you in advance for your help.