Skip to content

Commit

Permalink
Merge pull request #74 from mateusvicente100/master
Browse files Browse the repository at this point in the history
Update DataSet.Serialize.Import.pas
  • Loading branch information
mateusvicente100 committed Dec 22, 2020
2 parents 2f2d0d3 + 0d97fde commit 3c724a5
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/core/DataSet.Serialize.Import.pas
Original file line number Diff line number Diff line change
Expand Up @@ -427,6 +427,8 @@ procedure TJSONSerialize.JSONValueToDataSet(const AJSONValue: {$IF DEFINED(FPC)}
begin
if ADataSet.Fields.Count <> 1 then
raise EDataSetSerializeException.Create(Format(INVALID_FIELD_COUNT, [ADataSet.Name]));
if not ADataSet.Active then
ADataSet.Open;
ADataSet.Append;
ADataSet.Fields.Fields[0].AsString := AJSONValue.Value;
ADataSet.Post;
Expand Down

0 comments on commit 3c724a5

Please sign in to comment.