Bladeren bron

* Do not set the Transaction property of a TDatabase while assigning TSQLTransaction.Database when the TSQLTransaction is loaded from stream

git-svn-id: trunk@12680 -
joost 16 jaren geleden
bovenliggende
commit
6ceb016593
1 gewijzigde bestanden met toevoegingen van 1 en 1 verwijderingen
  1. 1 1
      packages/fcl-db/src/sqldb/sqldb.pp

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

@@ -779,7 +779,7 @@ begin
       with TSQLConnection(DataBase) do
         if Transaction = self then Transaction := nil;
     inherited SetDatabase(Value);
-    If Assigned(Database) then
+    If Assigned(Database) and not (csLoading in ComponentState) then
       If (TSQLConnection(DataBase).Transaction=Nil) then
         TSQLConnection(DataBase).Transaction:=Self;
     end;