婓剒猁勤桶氝樓珨隅杅醴腔暮翹ㄛ甜暮翹潔腔囀硐衄竭苤曹趙奀祥溥妏蚚狟醱腔滲杅﹝
{************************************************
// procedure AppendCurrent
//
// Written By: Steve Zimmelman
// 6/4/96
//
// Version: Delphi 2.0
//
// Will append an exact copy of the current
// record of the dataset that is passed into
// the procedure and will return the dataset
// in edit state with the record pointer on
// the currently appended record.
************************************************}
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[i] := DataSet.fields[i].Value ;
End;
DataSet.Append ;
// Put array values into new the record
For i := 0 to (DataSet.Fieldcount-1) Do Begin
DataSet.fields[i].Value := aField[i] ;
End;
End;