IsDisconnected: Boolean;
The IsDisconnected property returns whether there is no connection with database.
Available values:
True. No connection.
False. The connection is established and available for further work.
Add links to the Dal system assembly.
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.
See also: