|
Type
CurrList = record
iID: Integer;
cCode: String;
cField1: String;
cField2: String;
Var
Curr500: Array Of CurrList;
function LoadComboBox (ObjCurr: array of CurrList; ado: TAdoQuery): Boolean;
var
iCount: integer;
begin
iCount: = 0;
ado.First;
While Not ado.Eof Do
Begin
iCount: = iCount + 1;
ObjCurr [iCount-1] .iID: = ado.FieldByName ('iID'). AsInteger;
ObjCurr [iCount-1] .cField1: = ado.FieldByName ('cField1'). AsString;
ado.Next;
End;
end;
// Init operation
SetLength (Curr500, ado.RecordCount);
LoadComboBox (Curr500, ado);
// Is Curr500 empty when called?
Edit1.text: = Curr500 [iIndex] .cField1;
// thanks |
|