Ver Fonte

* Correct use of FieldDefs factory

git-svn-id: trunk@26778 -
michael há 11 anos atrás
pai
commit
feed8adfa6
1 ficheiros alterados com 1 adições e 1 exclusões
  1. 1 1
      packages/fcl-db/src/base/xmldatapacketreader.pp

+ 1 - 1
packages/fcl-db/src/base/xmldatapacketreader.pp

@@ -157,7 +157,7 @@ begin
     AFieldNode := item[i];
     if AFieldNode.CompareName('FIELD')=0 then
       begin
-      AFieldDef := TFieldDef.Create(DataSet.FieldDefs);
+      AFieldDef := Dataset.FieldDefs.AddFieldDef;
       AFieldDef.DisplayName:=GetNodeAttribute(AFieldNode,'fieldname');
       AFieldDef.Name:=GetNodeAttribute(AFieldNode,'attrname');
       AFieldDef.Size:=StrToIntDef(GetNodeAttribute(AFieldNode,'width'),0);