Show contents 

Db > Db Assembly Interfaces > ILog > ILog.AlterLog

ILog.AlterLog

Syntax

AlterLog(OldLog: ILog);

Parameters

OldLog is the log, structure of table of which should be updated according to the structure of current log.

Description

The AlterLog method updates the OldLog log table structure on a database server according to structure of current log.

Example

Executing the example requires two logs with the Log_1 and Log_2 identifiers in repository.

Sub UserProc;
Var
    MB: IMetabase;
    Log, OldLog: ILog;
Begin
    Mb := MetaBaseClass.Active;
    Log := Mb.ItemById("Log_1").Edit As ILog; // log, which structure will be used for update
    OldLog := Mb.ItemById("Log_2").Bind As ILog; // log, which structure on database server will be updated
    Log.NativeName := OldLog.NativeName; // set equal physical names temporarily.
    // it is required for saving uniqueness of physical name of OldLog log
    Log.AlterLog(OldLog);
End Sub UserProc;

After executing the example, the structure of the log table on database server, referenced by the repository log Log_2, is updated. The structure is set according to the table structure, referenced by the repository log Log_1.

See also:

ILog