Browse Source

* Use factory for fielddefs

git-svn-id: trunk@26786 -
michael 11 years ago
parent
commit
196d8cee3d
1 changed files with 1 additions and 1 deletions
  1. 1 1
      packages/fcl-db/src/sqldb/mssql/mssqlconn.pp

+ 1 - 1
packages/fcl-db/src/sqldb/mssql/mssqlconn.pp

@@ -701,7 +701,7 @@ begin
         FieldType := ftAutoInc;
     end;
 
-    with TFieldDef.Create(FieldDefs, FieldDefs.MakeNameUnique(FieldName), FieldType, FieldSize, (col.Null=0) and (not col.Identity), i) do
+    with FieldDefs.Add(FieldDefs.MakeNameUnique(FieldName), FieldType, FieldSize, (col.Null=0) and (not col.Identity), i) do
     begin
       // identity, timestamp and calculated column are not updatable
       if col.Updatable = 0 then Attributes := Attributes + [faReadonly];