IDalConnectionDescriptorParams.Item

Syntax

Item(Index: Integer): IDalConnectionDescriptorParam;

Parameters

Index. Parameter index.

Description

The Item property returns the parameter that is used to connect to the database server.

Example

Add links to the Dal system assembly.

Sub UserProc;
Var
    Driver: IDalDriver;
    ConnectDesc: IDalConnectionDescriptor;
    Params: IDalConnectionDescriptorParams;
    Connect: IDalConnection;
    Comand: IDalCommand;
Begin
    Driver := New DalOrcl8Driver.Create As IDalDriver;
    ConnectDesc := Driver.CreateDescriptor;
    Params := ConnectDesc.Params;
    Params.Item(0).Value := "User";
    Params.Item(1).Value := "Password";
    Params.Item(2).Value := "OrclServer";
    Params.Item(3).Value := "Repository";
    Connect := ConnectDesc.CreateConnection;
    Comand := Connect.CreateCommand;
    Comand.SQL := "Select * From Table_1";
    Comand.Execute;
    Comand.Close;
    Connect.Close;
End Sub UserProc;

After executing the example a new database server connection is created. The required parameters containing information about server location are specified for connection. After that the SQL query is executed that extracts all records from the specified table.

See also:

IDalConnectionDescriptorParams