Navigation: ABC Library Reference > TransactionManager > TransactionManager Methods >====== SetLogoutOff (turn off logout for all RelationManagers in transaction list) ====== | |
SetLogoutOff( )
SetLogoutOff | Turn off default logout setting in all RelationManagers stored in TransactionManager list queue |
SetLogoutOff is used to set the default logout setting in the appropriate RelationManager objects contained in the protected TransactionManagerQueue to OFF. This allows the TranactionManager to control the tranaction process through its own properties and methods.
Implementation:
The SetLogoutOff method loops through the list of RelationManager objects listed by the TranactionManager, saves the appropriate status of the RelationManager's UseLogout property, and sets the UseLogout property to FALSE. It is internally called by the Start method, or may be called explicitly in a process where multiple transactions with batches of records may occur, and the continued call to the Start method for each batch does not need to continually reset the UseLogout property.
Example:
TransactionManager.Start PROCEDURE()
I LONG,AUTO
RetVal BYTE,AUTO
CODE
IF SELF.TransactionRunning THEN RETURN Level:Fatal.
IF SELF.AutoLogoutOff
FREE(SELF.UselogoutList)
SELF.LogoutOff = True
END
FREE(SELF.RMList)
LOOP I=1 TO RECORDS(SELF.Files)
GET(SELF.Files,I)
IF NOT ERRORCODE()
IF SELF.AutoLogoutOff
SELF.SetLogoutOff(SELF.Files.RM)
END
RetVal = SELF.AddFileToLogout(SELF.Files.RM,SELF.Files.Cascade)
IF RetVal<;>Level:Benign
BREAK
END
END
END
See Also: RestoreLogout