ICubeMetaloaderImportCallback.OnAfterStartTransaction

Fore Syntax

OnAfterStartTransaction(RubInst: IRubricatorInstance;
                        SecurConn: ISecurityConnection);

Fore.NET Syntax

OnAfterStartTransaction(RubInst: Prognoz.Platform.Interop.Cubes.IRubricatorInstance;
                        SecurConn: Prognoz.Platform.Interop.Metabase.ISecurityConnection);

Parameters

RubInst. Time series database, to which data is imported.

SecurConn. Database server connection parameters.

Description

The OnAfterStartTransaction method implements the event occurring after opening a transaction.

Comments

For correct use the method must be redetermined in the custom class that is an event handler. This handler must also be set in object parameters used for time series import.

Fore Example

The example gives description of the custom class that is an event handler.

Add links to the Cubes and Metabase system assemblies.

Class ImportCallBack: object, ICubeMetaloaderImportCallback
    // Procedure implements event occurring after opening transaction
    Public Sub OnAfterStartTransaction(RubInst: IRubricatorInstance; SecurConn: ISecurityConnection);
    Begin
        Debug.WriteLine("User started transaction on the server: '" + SecurConn.UserNameLo + "' ");
    End Sub OnAfterStartTransaction;
    
    // Procedure implements event occurring before fixing transaction
    Public Sub OnBeforeCommit(RubInst: IRubricatorInstance; SecurConn: ISecurityConnection);
    Begin
        Debug.WriteLine("User will fix transaction on the server: '" + SecurConn.UserNameLo + "' ");
    End Sub OnBeforeCommit;
    
End Class ImportCallBack;

The class use for event processing is given in the example for ICubeMetaLoader.ImportCallback.

Fore.NET Example

The requirements and result of the Fore.NET example execution match with those in the Fore example.

Imports Prognoz.Platform.Interop.Cubes;

// Class to handle import events
Public Class ImportCallBack: object, ICubeMetaloaderImportCallback
    // Procedure implements event occurring after opening transaction
    Public Sub OnAfterStartTransaction(RubInst: IRubricatorInstance; SecurConn: ISecurityConnection);
    Begin
        System.Diagnostics.Debug.WriteLine("User started transaction on the server: '" + SecurConn.UserNameLo + "' ");
    End Sub OnAfterStartTransaction;
    
    // Procedure implements event occurring before fixing transaction
    Public Sub OnBeforeCommit(RubInst: IRubricatorInstance; SecurConn: ISecurityConnection);
    Begin
        System.Diagnostics.Debug.WriteLine("User will fix transaction on the server: '" + SecurConn.UserNameLo + "' ");
    End Sub OnBeforeCommit;
    
End Class ImportCallBack;

See also:

ICubeMetaloaderImportCallback