MonitorService.Disconnect

This function disconnects the database session.

Syntax Parameters Return Value
- This function has no parameters. This function does not return a value.

SVB Example

Running an SVB analysis configuration:

Sub Main

    Dim oOM As New ObjectManager
    oOM.Reconnect(Application)

    'Find the SVB analysis configuration
    Dim mon As Monitor
    Set mon = oOM.Monitors.Item("/Blake's Materials/Weights Descriptives")

    'Create a service to run analysis configurations
    Dim monSrvCreator As New MonitorServiceCreator
    Dim monSrv As MonitorService
    Set monSrv = monSrvCreator.CurrentServiceEx(Application)

    'Set the parameters for how to run the analysis configuration
    Dim monRunOpt As New MonitorRunOption
    monRunOpt.Add "RunQuiet", True
    monRunOpt.Add "DisplayInPanel", False
    monRunOpt.Add "DisableAutoTransfer", True
    monRunOpt.Add "TargetSpreadsheetFileName", "NoFile"
    monRunOpt.Add "CheckMonitorRunEntryExist", False
    monRunOpt.Add "Force_Display_SQLCriteria_Dialog_If_Required_Fields_Need_Values", True

    'Run it
    Dim monRunStatus As MonitorRunStatus
    Set monRunStatus = monSrv.RunMonitor_New(mon.ID, monRunOpt)

    monRunStatus.WaitForComplete

    oOM.Disconnect

End Sub