fcl-db: memds: when copying data from source dataset to destination honor NULL values. Bug #32537

git-svn-id: trunk@37523 -
This commit is contained in:
lacak 2017-10-26 12:53:25 +00:00
parent 5c98c93500
commit 555528d145

View File

@ -1159,19 +1159,22 @@ begin
begin
F1:=TField(L1[i]);
F2:=TField(L2[I]);
Case F1.DataType of
ftFixedChar,
ftString : F1.AsString:=F2.AsString;
ftBoolean : F1.AsBoolean:=F2.AsBoolean;
ftFloat : F1.AsFloat:=F2.AsFloat;
ftLargeInt : F1.AsInteger:=F2.AsInteger;
ftSmallInt : F1.AsInteger:=F2.AsInteger;
ftInteger : F1.AsInteger:=F2.AsInteger;
ftDate : F1.AsDateTime:=F2.AsDateTime;
ftTime : F1.AsDateTime:=F2.AsDateTime;
ftDateTime : F1.AsDateTime:=F2.AsDateTime;
else F1.AsString:=F2.AsString;
end;
if F2.IsNull then
F1.Clear
else
Case F1.DataType of
ftFixedChar,
ftString : F1.AsString:=F2.AsString;
ftBoolean : F1.AsBoolean:=F2.AsBoolean;
ftFloat : F1.AsFloat:=F2.AsFloat;
ftLargeInt : F1.AsInteger:=F2.AsInteger;
ftSmallInt : F1.AsInteger:=F2.AsInteger;
ftInteger : F1.AsInteger:=F2.AsInteger;
ftDate : F1.AsDateTime:=F2.AsDateTime;
ftTime : F1.AsDateTime:=F2.AsDateTime;
ftDateTime : F1.AsDateTime:=F2.AsDateTime;
else F1.AsString:=F2.AsString;
end;
end;
Try
Post;