mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-09-04 18:10:26 +02:00
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:
parent
5c98c93500
commit
555528d145
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user