GetConnectionObj 

Syntax

object.GetConnectionObj

Description

Call this method to obtain a pointer to an active connection object of ELS-QB component.

Remarks

                        GetConnectionObj method returns the pointer to IUnknown interface of a connection object represented by the currently selected connection container in the Databases folder of the ELS-QB component or Null if no connection container selected.

Example

This sample code demonstrates  how to use the pointer ELS-QB controlís internal Connection object returned  by GetConnectionObj() method to manipulate with some properties of it (i.e. set Connection objectís timeout).

Private Sub SetConnTimeout(oConn As ADODB.Connection )

    If Not IsNull(oConn) Then

        oConn.ConnectionTimeout = 30

    End If

End Sub

' Some command handler

Private Sub itmCmdSetConnectionTimeout_Click()

 SetConnTimeout ELS_QBCtrl.GetConnectionObj

End Sub