IDalConnection2.Clone

Syntax

Clone(Type: DalConnectionType): IDalConnection;

Parameters

Type. Connection type.

Description

The Clone method creates a specialized copy of the connection.

Example

To connect the example, connect the Metabase and Dal system assemblies to the module.

Sub UserProc;
Var
    Driver: IDalDriver;
    SchemeName: string;
    Connect: IDalConnection;
    CloneConnect: IDalConnection;
    Connect2: IDalConnection2;
    ConnectDesc: IDalConnectionDescriptor;
    ConnectDesc2: IDalConnectionDescriptor2;
    Params: IDalConnectionDescriptorParams;
Begin
    driver := New DalOrcl8Driver.Create;
    SchemeName := "Schema";
    ConnectDesc := Driver.CreateDescriptor;
    Params := ConnectDesc.Params;
    Params.Find("User Name").Value := "Warehouse";
    Params.Find("Password").Value := "Warehouse";
    Params.Find("Host BSTR").Value := "TestServer";
    Params.Find(SchemeName).Value := "Warehouse";
    Connect := ConnectDesc.CreateConnection As IDalConnection;
    ConnectDesc2 := ConnectDesc As IDalConnectiondescriptor2;
    Connect2 := Connect As IDalConnection2;
    CloneConnect := Connect2.Clone(DalConnectionType.FastInsert);
End Sub UserProc;

On executing the example the connection is established to the specified repository. After that the connection copy is created, which is used to quickly insert data.

See also:

IDalConnection2