How to copy TDataSet record with ftMemo fields? lazarus / 16-Databases ---------------------------------------------------------------------- vladvons · 2013-10-20 12:26 I want to save and paste all fields in DataSet record, so i use 'array of variant' as backup storage. No problem reading DataSet fields into an array, but after writing values back from array into a DataSet all fields with ftMemo type remains empty. Code: [Select]procedure TDmRefItem.CloneRecord(aDataSet: TDataSet); var   i: Integer;   ArrBackUp: array of Variant; begin   SetLength(ArrBackUp, aDataSet.FieldCount);   for i := 0 to aDataSet.FieldCount - 1 do      ArrBackUp[i] := aDataSet.Fields[i].Value    aDataSet.Append();   for i := 0 to aDataSet.FieldCount - 1 do   begin     if (aDataSet.Fields[i].DataType = ftMemo) then       aDataSet.Fields[i].Value :=  ArrBackUp[i]       //aDataSet.Fields[i].AsString :=  ArrBackUp[i];       //aDataSet.Fields[i].Text :=  ArrBackUp[i];     else       aDataSet.Fields[i].Value :=  ArrBackUp[i]   end; end; ---------------------------------------------------------------------- vladvons · 2013-10-21 12:19 Even simle assignment string variable to memo field does nothing. Lets assume that aDataSet.FieldByName('Descr').DataType is ftMemo, then following code doest work properly Code: [Select]aDataSet.FieldByName('Descr').Value := 'My string'; String1 := aDataSet.FieldByName('Descr').Value; // String1 is 'Null' now ---------------------------------------------------------------------- LacaK · 2013-10-21 12:39 Can you please post here same simple application, which will show error ? (f.e. using TBufDataSet)