Browse Source

* Use factory for fielddefs

git-svn-id: trunk@26784 -
michael 11 years ago
parent
commit
d7d4035252
1 changed files with 1 additions and 1 deletions
  1. 1 1
      packages/fcl-db/src/sqldb/odbc/odbcconn.pas

+ 1 - 1
packages/fcl-db/src/sqldb/odbc/odbcconn.pas

@@ -1302,7 +1302,7 @@ begin
     end;
     end;
 
 
     // add FieldDef
     // add FieldDef
-    with TFieldDef.Create(FieldDefs, FieldDefs.MakeNameUnique(ColName), FieldType, FieldSize, (Nullable=SQL_NO_NULLS) and (AutoIncAttr=SQL_FALSE), i) do
+    with FieldDefs.Add(FieldDefs.MakeNameUnique(ColName), FieldType, FieldSize, (Nullable=SQL_NO_NULLS) and (AutoIncAttr=SQL_FALSE), i) do
     begin
     begin
       if Updatable = SQL_ATTR_READONLY then Attributes := Attributes + [faReadonly];
       if Updatable = SQL_ATTR_READONLY then Attributes := Attributes + [faReadonly];
     end;
     end;