OnAfterStartTransaction(RubInst: IRubricatorInstance;
SecurConn: ISecurityConnection);
OnAfterStartTransaction(RubInst: Prognoz.Platform.Interop.Cubes.IRubricatorInstance;
SecurConn: Prognoz.Platform.Interop.Metabase.ISecurityConnection);
RubInst. Time series database, to which data is imported.
SecurConn. Database server connection parameters.
The OnAfterStartTransaction method implements the event occurring after opening a transaction.
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.
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.
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: