IMetabaseObjectDescriptor.GetChangesHistoryLog

Syntax

GetChangesHistoryLog([Start: DateTime = 0;] [End_: DateTime = 0]): IChangesHistoryAuditLog;

Parameters

Start. Start date.

End_. End date.

Description

The GetChangesHistoryLog method returns repository object version log for the specified period.

Comments

To execute the method, the user must have the View Access Protocol privilege.

Example

Executing the example requires that the repository contains an object with the REPORT identifier.

Add links to the Dal and Metabase system assemblies.

Sub UserProc;
Var
    Mb: IMetabase;
    MDesc: IMetabaseObjectDescriptor;
    DateStart, DateEnd: DateTime;
    History: IChangesHistoryAuditLog;
Begin
    Mb := MetabaseClass.Active;
    MDesc := Mb.ItemById("REPORT");
    Debug.WriteLine("Object: " + MDesc.Name + '(' + MDesc.Id + ')');
    Debug.Indent;
    DateEnd := DateTime.Now;
    DateStart := DateTime.AddDays(DateEnd, -2);
    // Open access protocol
    History := MDesc.GetChangesHistoryLog(DateStart, DateEnd);
    While Not History.Eof Do
        Debug.WriteLine("Operation - " + History.Name + ". " +
            DateTime.FromDouble(History.Stamp).ToString + '|' +
            History.Station + '|' +
            History.UserIP + '|' + History.UserName + '|' + History.UserOS);
        History.Next;
    End While;
    Debug.Unindent;
End Sub UserProc;

After executing the example the development environment console displays the object version log for the last two days.

See also:

IMetabaseObjectDescriptor

Defect 353945