Load;
The Load method downloads data from repository to an object in PC memory.
This method must be called before writing to the end consumer by using the following methods: ReadToFile, ReadToStream or ReadToXML.
Executing the example requires that the repository contains a custom class object with the OBJ_CUSTOM identifier. There also must be the file C:\To.txt.
Sub Main;
Var
Mb: IMetabase;
Object: IMetabaseObject;
CustomObject: IMetabaseCustomObject;
Writer: IMetabaseCustomObjectWriter;
Reader: IMetabaseCustomObjectReader;
Begin
Mb := MetabaseClass.Active;
Object := Mb.ItemById("OBJ_CUSTOM").Edit;
CustomObject := Object As IMetabaseCustomObject;
Reader := CustomObject.CreateReader;
Reader.Load;
Reader.ReadToFile("C:\To.txt");
Object.Save;
End Sub Main;
After executing this example data are downloaded in a custom object. Then these data are downloaded in the file C:\To.txt.
See also: