AlterLog(OldLog: ILog);
OldLog is the log, structure of table of which should be updated according to the structure of current log.
The AlterLog method updates the OldLog log table structure on a database server according to structure of current log.
Executing the example requires two logs with the Log_1 and Log_2 identifiers in repository.
Sub Main;
Var
MB: IMetabase;
Log, OldLog: ILog;
Begin
Mb := MetaBaseClass.Active;
Log := Mb.ItemById("Log_1").Edit As ILog; //Log according to structure of which we update
OldLog := Mb.ItemById("Log_2").Bind As ILog; //log, structure on DB server of which we update
Log. NativeName: = OldLog. NativeName; //we temporarily set identical physical names.
//It is necessary to save uniqueness of phys. name of log OldLog
Log.AlterLog(OldLog);
End Sub Main;
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: