Browse Source

* Position keeps increasing in firebird, but can have missing positions when a field is dropped

git-svn-id: trunk@13855 -
michael 16 years ago
parent
commit
43d3bacc78
1 changed files with 3 additions and 3 deletions
  1. 3 3
      packages/fcl-db/src/datadict/fpddfb.pp

+ 3 - 3
packages/fcl-db/src/datadict/fpddfb.pp

@@ -459,7 +459,7 @@ Var
 
   {Opmerking: bestaande fielddefs die niet meer in de tabel zitten worden niet verwijderd !? }
 
-  function ImportFieldDef : boolean;
+  function ImportFieldDef(APosition : Integer) : boolean;
   var FD : TDDFieldDef;
       n, s : string;
   begin
@@ -497,7 +497,7 @@ Var
         FD.Required:=false
     else
       FD.Required:=false;
-    FD.index := FPosition.AsInteger;
+    FD.index := APosition;
     s := trim(FDomainName.asstring);
     if copy(s, 1, 4) <> 'RDB$' then
       FD.DomainName := s
@@ -513,7 +513,7 @@ Var
     BindFields;
     while not Q.eof do
       begin
-      if ImportFieldDef then
+      if ImportFieldDef(Result) then
         inc (result);
       Q.Next;
       end;