ISecurityConnection2.Clone

Syntax

Clone(Type : DalConnectionType): ISecurityConnection;

Parameters

Type. Parameter that determines a database connection type.

Description

The Clone method creates a specific copy of connection.

Example

To execute the example, connect the Metabase, Dal and Db system assemblies to the unit.

Sub UserProc;
Var
    MB: IMetabase;
    DB: IDatabaseInstance;
    Connect: ISecurityConnection;
    CloneConnect: ISecurityConnection;
    Connect2: ISecurityConnection2;
    Command: IDalCommand;
Begin
    MB := MetabaseClass.Active;
    DB := MB.ItemById("BD").Open(NullAs IDatabaseInstance;
    Connect := DB.Connection;
    Connect2 := Connect As ISecurityConnection2;
    debug.WriteLine(Connect2.Type);
    CloneConnect := Connect2.Clone(DalConnectionType.FastInsert);
End Sub UserProc;

After executing the example connection type is displayed in the console window and a copy of installed connection (Connection for fast insert) is created.

See also:

IDalConnection2