懒人请参阅如下过程,你将得到启发
Procedure AppendCurrent(Dataset:Tdataset);
Var
aField : Variant ;
i : Integer ;
Begin
//Create a variant Array
aField := VarArrayCreate(
[0,DataSet.Fieldcount-1],
VarVariant);
// read values into the array
For i := 0 to (DataSet.Fieldcount-1) Do Begin
aField := DataSet.fields.Value ;
End;
DataSet.Append ;
// Put array values into new the record
For i := 0 to (DataSet.Fieldcount-1) Do Begin
DataSet.fields.Value := aField ;
End;
End;