IDalConnectionDescriptorParams.Find

Syntax

Find(Param: String): IDalConnectionDescriptorParam;

Parameters

Param. Parameter name.

Description

The Find method searches for a parameter by its name.

NOTE. The method is not intended to be used in application code. It is kept for compatibility with previous versions.

Comments

The list of parameters is formed by the Foresight Analytics Platform kernel individually for each driver. Names of parameters specified in the Name parameter can be obtained in the IDalConnectionDescriptorParam.Name property on navigating the current collection of parameters.

There is also a specific parameter CursorMaxBufferSize that affects the further work. The parameter determines size of the buffer used for working with cursors. Size is specified in bytes.

NOTE. The CursorMaxBufferSize parameter affects the work with servers based only on DBMS Oracle 9.x\10.x\11.x.

Example

Sub UserProc;
Var
    MB: IMetabase;
    Driv: IDalDriver;
    ConnectDesc: IDalConnectionDescriptor;
    Params: IDalConnectionDescriptorParams;
    Connect: IDalConnection;
    Comand: IDalCommand;
Begin
    MB := MetabaseClass.Active;
    Driv := 
New DalOrcl8Driver.Create As IDalDriver;
    ConnectDesc := Driv.CreateDescriptor;
    Params := ConnectDesc.Params;
    Params.Find(
"User Name").Value := "User";
    Params.Find(
"Password").Value := "Password";
    Params.Find(
"Host BSTR").Value := "OrclServer";
    Params.Find(
"Schema").Value := "Warehouse";
    Params.Find(
"CursorMaxBufferSize").Value := "1000000";
    Connect := ConnectDesc.CreateConnection;
    Comand := Connect.CreateCommand;
    Comand.SQL := 
"Select * From Table_1";
    Comand.Execute;
    Comand.Close;
End Sub UserProc;

After executing the example the new connection to the database server is created, after assigning four mandatory parameters, the connection to the Warehouse schema placed on the Test server is established. Then the SQL query that selects all records from the Table_1 table is executed. The appropriate parameters are searched by name to assign the values of connection parameters.

See also:

IDalConnectionDescriptorParams