SupportsConnectionType(Type:DalConnectionType): Boolean;
Type. The parameter determines a database connection type.
The SupportsConnectionType method determines whether the connection type specified in parameters is supported by the driver.
The method returns True if the specified connection type is supported by the driver; otherwise the method returns False.
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;
Begin
MB := MetabaseClass.Active;
DB := MB.ItemById("BD").Open(Null) As IDatabaseInstance;
Connect := DB.Connection;
Connect2 := Connect As ISecurityConnection2;
debug.WriteLine(Connect2.Type);
if Connect2.SupportsConnectionType(DalConnectionType.FastInsert) then
CloneConnect := Connect2.Clone(DalConnectionType.FastInsert);
end if;
End Sub UserProc;
After executing the example a connection type is displayed in the console window, and a copy of available connection (Connection for fast insert) if the driver supports this connection type is created.
See also: