|
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;
//初始化操作
SetLength(Curr500,ado.RecordCount);
LoadComboBox(Curr500,ado);
//调用时发现Curr500为空?
Edit1.text := Curr500[iIndex].cField1;
//多谢 |
|