IMetabaseUpdateUserEvents.OnUpdateObject

Syntax

OnUpdateObject(Update: IMetabaseUpdate; CurrentNode: IMetabaseUpdateNode; Var Skip: Boolean);

Parameters

Update - update applied to the current repository.

CurrentNode - update object applied to repository object.

Skip - parameter that determines whether the object is updated. The default value is False, the object is updated.

If the parameter is set to True, the object that corresponds to the CurrentNode object is not updated. The object is skipped.

Description

The OnUpdateObject method implements an event that appears occurs right before updating of repository object that corresponds to the CurrentNode update object.

Example

Public Class CUpdateEvents: UpdateEvents

Public Sub OnBeginUpdate(Update: IMetabaseUpdate);

Var

Flag: IMetabaseUpdateProperty;

Begin

Debug.WriteLine("Update of repository objects");

Flag := Update.Properties.FindById("Ver");

If Flag <> Null Then

Flag.Value := "1.1";

End If;

End Sub OnBeginUpdate;

 

Public Sub OnAskConstraintsHandling(Update: IMetabaseUpdate; Node: IMetabaseUpdateNode;

Details: String;

Var Handling: UpdateDataConstraintsHandlingType);

Begin

Handling := UpdateDataConstraintsHandlingType.KeepTableUnchanged;

End Sub OnAskConstraintsHandling;

 

Public Sub OnAskReflectRights(Var Cancel: Boolean);

Begin

Cancel := True;

End Sub OnAskReflectRights;

 

Public Sub OnUpdateObject(Update: IMetabaseUpdate; CurrentNode: IMetabaseUpdateNode; Var Skip: Boolean);

Begin

If CurrentNode.NodeType = MetabaseUpdateNodeType.DeleteObject Then

Skip := True;

End If;

End Sub OnUpdateObject;

 

Public Sub OnEndUpdate(Update: IMetabaseUpdate);

Begin

Debug.WriteLine("Update of objects is completed");

End Sub OnEndUpdate;

End Class CUpdateEvents;

This example is a template for update unit. On applying of update that contains this unit the following is checked:

See also:

IMetabaseUpdateUserEvents