IsDisconnected: Boolean;
IsDisconnected(): Boolean;
The IsDisconnected method returns whether connection with DB server is disconnected.
If connection with DB server is disconnected, the method returns True, otherwise, False.
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.
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: