Explorar o código

* Always initialize autoincvalue in createdataset

git-svn-id: trunk@45202 -
michael %!s(int64=5) %!d(string=hai) anos
pai
achega
3a55fef285
Modificáronse 1 ficheiros con 2 adicións e 1 borrados
  1. 2 1
      packages/fcl-db/src/base/bufdataset.pas

+ 2 - 1
packages/fcl-db/src/base/bufdataset.pas

@@ -3546,8 +3546,9 @@ begin
       end
     else
       raise Exception.Create(SErrNoFieldsDefined);
-    FAutoIncValue:=1;
     end;
+  if FAutoIncValue<0 then  
+    FAutoIncValue:=1;
   // When a FileName is set, do not read from this file; we want empty dataset
   AStoreFileName:=FFileName;
   FFileName := '';