UpdateOrder: MetabaseObjectUpdateOrder;
UpdateOrder: Prognoz.Platform.Interop.Metabase.MetabaseObjectUpdateOrder;
The UpdateOrder property determines the order of updating of objects data.
To determine the method of object data update, use the IMetabaseUpdateObjectNode.UpdatePart property.
Executing the example requires the update file C:\Update.pefx. The repository must contain a table with the Table_1 identifier.
Add a link to the Metabase system assembly.
Sub UserProc;
Var
MB: IMetabase;
Update: IMetabaseUpdate;
UFN: IMetabaseUpdateFolderNode;
UON: IMetabaseUpdateObjectNode;
Begin
MB := MetabaseClass.Active;
Update := Mb.CreateUpdate;
Update.LoadFromFileNF("C:\temp\Update.pefx");
Update.Prepare; //
UFN := Update.RootFolder;
UON := UFN.Add(MetabaseUpdateNodeType.DataObject) As IMetabaseUpdateObjectNode;
UON.Object := MB.ItemById("Table_1");
UON.UpdateOrder := MetabaseObjectUpdateOrder.Default_;
UON.UpdatePart := MetabaseObjectUpdatePart.DataMetadataSD;
Update.SaveToFileNF("C:\temp\Update.pefx");
End Sub UserProc;
After executing the example the default order of object data update is set. After that a table will be added to the update, loaded from the file C:\Update.pefx. Then the update is saved. Data, metadata, and access permissions for this table will be updated during update execution.
The requirements and result of the Fore.NET example execution match with those in the Fore example.
Public Shared Sub Main(Params: StartParams);
Var
MB: IMetabase;
Update: IMetabaseUpdate;
UFN: IMetabaseUpdateFolderNode;
UON: IMetabaseUpdateObjectNode;
Begin
MB := Params.Metabase;
Update := Mb.CreateUpdate();
Update.LoadFromFileNF("C:\temp\" + "Update.pefx", UpdateLoadMode.ulmInsertUpdate);
Update.Prepare();
UFN := Update.RootFolder;
UON := UFN.Add(MetabaseUpdateNodeType.untDataObject) As IMetabaseUpdateObjectNode;
UON.Object := MB.ItemById["Table_1"];
UON.UpdateOrder := MetabaseObjectUpdateOrder.mouoDefault;
UON.UpdatePart := MetabaseObjectUpdatePart.moupDataMetadataSD;
Update.SaveToFileNF("C:\temp\" + "Update.pefx");
End Sub;
See also: