ISecurityConnection.IsDisconnected

Fore Syntax

IsDisconnected: Boolean;

Fore.NET Syntax

IsDisconnected(): Boolean;

Description

The IsDisconnected method returns whether connection with DB server is disconnected.

Comments

If connection with DB server is disconnected, the method returns True, otherwise, False.

Fore Example

To execute the example, add a link to the Metabase system assembly.

Sub UserProc;
Var
    MB: IMetabase;
    LoS: ILogonSession;
    User: ISecurityConnection;
    Disconnection: Boolean;
Begin
    MB:=MetabaseClass.Active;
    LoS:=MB.LogonSession;
    User:=LoS.PrimaryConnection;
    Disconnection:=User.IsDisconnected;
    Debug.WriteLine (Disconnection);
End Sub UserProc;

After executing this example if network connection is disconnected, True is displayed in the console, otherwise, False.

Fore.NET Example

This example is an entry point for any .NET assembly.

Public Shared Sub Main(Params : StartParams);
Var
    MB: IMetabase;
    LoS: ILogonSession;
    User: ISecurityConnection;
    Disconnection: Boolean;
Begin
    MB:= Params.Metabase;
    LoS:=MB.LogonSession;
    User:=LoS.PrimaryConnection;
    Disconnection:=User.IsDisconnected();
    System.Diagnostics.Debug.WriteLine(Disconnection);
End Sub Main;

After executing this example if network connection is disconnected, True is displayed in the console, otherwise, False.

See also:

ISecurityConnection