السلام عليكم
استخدام AppendRecord لإضافة سجل بأكمله
مثال لاستخدامها لنسخ نفس الحقل في الجدول:
عدل على المثال كما تشاء 
بالتوفيق.
استخدام AppendRecord لإضافة سجل بأكمله
مثال لاستخدامها لنسخ نفس الحقل في الجدول:
PHP كود :
procedure DuplicateCurrentRecord(aDataSet : TDataSet);
var
Data : array of variant;
aRecord : array of TVarRec;
i : integer;
max : integer;
begin
max := aDataSet.fields.count -1;
// set the lenghth of the arecord array to be the same as the number of
// elements in the data array
SetLength(arecord,max+1);
SetLength(data,max+1);
// set the variant type pointers to the data array
for i := 0 to max do
begin
arecord[i].VType := vtVariant;
arecord[i].VVariant := @data[i];
end;
// Copy the Record to the Array
for i := 0 to max do
Data[i] := aDataSet.fields[i].value;
// finally append the record in one go
aDataSet.AppendRecord(aRecord);
end;

بالتوفيق.
اللهم احقن دماء المسلمين، لا تنسوهم بالدعاء...

