IDalConnection.IsDisconnected

Syntax

IsDisconnected: Boolean;

Description

The IsDisconnected property returns whether there is no connection with database.

Comments

Available values:

Fore Example

Sub UserProc;
Var
    Driver: IDalDriver;
    Connect: IDalConnection;
    ConnectDesc: IDalConnectionDescriptor;
    ConnectDescParams: IDalConnectionDescriptorParams;
    b: Boolean;
Begin
    Driver := New DalOrcl8Driver.Create;
    ConnectDesc := Driver.CreateDescriptor;
    //Connection parameters
    ConnectDescParams := ConnectDesc.Params;
    ConnectDescParams.Find("User Name").Value := "User";
    ConnectDescParams.Find("Password").Value := "Password";
    ConnectDescParams.Find("Host BSTR").Value := "OrclServer";
    ConnectDescParams.Find("Schema").Value := "Repository";
    Connect := ConnectDesc.CreateConnection;
    b := Connect.IsDisconnected;
End Sub UserProc;

On executing the example the repository connection is established with specified location parameters. The "b" variable will store the value corresponding to database connection status.

Fore.NET Example

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

Imports Prognoz.Platform.Interop.Dal;
Imports Prognoz.Platform.PiLibNet.Utils;

Sub UserProc();
Var
    Driver: DalOrcl8Driver = ComCreator.Instance.CoCreate<DalOrcl8DriverClass>();
    Connect: IDalConnection;
    ConnectDesc: IDalConnectionDescriptor;
    ConnectDescParams: IDalConnectionDescriptorParams;
    b: Boolean;
Begin
    ConnectDesc := Driver.CreateDescriptor();
    //Connection parameters
    ConnectDescParams := ConnectDesc.Params;
    ConnectDescParams.Find("User Name").Value := "User";
    ConnectDescParams.Find("Password").Value := "Password";
    ConnectDescParams.Find("Host BSTR").Value := "OrclServer";
    ConnectDescParams.Find("Schema").Value := "Repository";
    Connect := ConnectDesc.CreateConnection();
    b := Connect.IsDisconnected;
End Sub;

See also:

IDalConnection