UpdateLog;
The UpdateLog method updates log table structure on database server according to structure of current log table.
The method is analog of the AlterLog method. At operation of the UpdateLog method, the structure of current log table in repository is taken as table structure that should be updated.
Sub Main;
Var
Mb: IMetabase;
MbObj: IMetabaseObject;
Log: ILog;
Fields: ITableField;
Begin
Mb:=MetaBaseClass.Active;
MbObj:=Mb.ItemById("NewLog").Edit;
Log:=MbObj As ILog;
Fields:=Log.Fields.Add;
Fields.Id:="PoleX";
Fields.Name:="PoleX";
Fields.DataType:=DbDataType.Integer;
Fields.Size:=10;
Log.UpdateLog;
End Sub Main;
After executing the example, the log table field is added to database without changing log structure in repository. The log identifier is NewLog.
See also: