WinStudio
IWSIDOCollection interface
Saves objects in a collection but does not perform subsequent operations that WinStudio normally performs after a save (see "Remarks" below). Returns a Boolean value indicating whether the objects were saved successfully.
object.SaveDeferStateUpdate( )
Part |
Description |
object | Required. A reference to a valid IDO collection object. |
A return value of:
After a Save operation, WinStudio normally performs the following tasks:
This method saves objects in a collection but does not perform the three subsequent tasks. In some cases, you might need to perform other actions after a Save has occurred but before the three tasks are performed. If your actions fail, you can then rollback the effects of the Save operation. This method allows you to do this.
This method is designed to be used in conjunction with the UpdateStatesPostSave method, which performs the three operations that WinStudio normally performs following a Save action.
Sub Main() ' This sample shows a scheme for an event handler ' that replaces the default implementation of the StdFormSave ' event. Dim bSuccess As Boolean Dim ReturnValue As String bSuccess = ThisForm.CurrentIDOCollection.SaveDeferStateUpdate() If (bSuccess) Then ' Some custom processing that returns bSuccess ' for successful completion -- that is, a method call. End If ' Either complete or rollback the transaction based on bSuccess. If (bSuccess) Then ThisForm.CurrentIDOCollection.UpdateStatesPostSave() Else ' Process to rollback the transaction. End If ' Cancel the default processing. ReturnValue = "-1" End Sub
SaveCurrentDeferStateUpdate Method
UpdateCurrentStatePostSave Method