Преглед на файлове

* Always initialize autoincvalue in createdataset

git-svn-id: trunk@45202 -
michael преди 5 години
родител
ревизия
3a55fef285
променени са 1 файла, в които са добавени 2 реда и са изтрити 1 реда
  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 := '';