使用 Delphi 2010
SQLQuery1.First; // move to the first record
while(not SQLQuery1.EOF)do begin
// do something with the current record
// What's the code should i write in this part in order to create a TEdit
// containing the user fullname the current item.
ShowMessage(SQLQuery1['whom']);
SQLQuery1.Next; // move to the next record
end;
ShowMessage(SQLQuery1['whom']);
更安全的写法是ShowMessage(SQLQuery1.FieldByName('whom').AsString);
。 - Jerry Dodge