ICubeOperationResult.Error

Syntax

Error: IException;

Description

The Error property determines an exception that occurred during data loading.

Example

Executing the example requires a data loader with the CUBE_LOAD identifier configured to send data from source cube to destination cube.

Sub UserProc;
Var
    MB: IMetabase;
    CubLoadInst: ICubeLoaderInstance;
    DimSS: IDimSelectionSet;
    DimS: IDimSelection;
    Result: ICubeOperationResult;
Begin
    MB := MetabaseClass.Active;
    CubLoadInst := MB.ItemById("CUBE_LOAD").Open(NullAs ICubeLoaderInstance;
    DimSS := CubLoadInst.Destination.CreateDimSelectionSet;
    For Each DimS In DimSS Do
        DimS.SelectAll;
    End For;
    Result := CubLoadInst.Execute(DimSS, Null, AutoCubeUpdateOption.NoCheckDuplicates Or AutoCubeUpdateOption.GetResult);
    Debug.WriteLine("Loader name: " + Result.Name);
    Debug.WriteLine("Loader identifier: " + Result.Id);
    Debug.WriteLine("Loading start: " + Result.TimeStart.ToString);
    Debug.WriteLine("Loading end: " + Result.TimeFinish.ToString);
    If Result.Succeeded Then
        Debug.WriteLine("Data is loaded successfully");
        Debug.WriteLine("Processed records: " + Result.RecordsProcessed.ToString);
    Else
        Debug.WriteLine("Data loading error");
        Debug.WriteLine("Error: " + Result.Error.Message);
    End If;
    Debug.WriteLine(Result.FormattedMessage);
End Sub UserProc;

After executing the example data is loaded to the cube. Loading results are displayed in the development environment console.

See also:

ICubeOperationResult