object.SetConnectionName  sConnName

sConnName        String that specifies the new name of the currently active connection node.


Call this method to rename a node that is currently active or open in the Connection pane.


SetConnectionName method returns True if the Connection pane is visible, a connection node is active and the renaming of this connection node was successful. Otherwise returns False.


This sample code shows how to rename currently active connection in ELS-QB component..

Private Function RenameConnection(sNewName As String) As Boolean

Dim sCurrName

RenameConnection = True

sCurrName = ELS_QBCtrl.GetConnectionName

If sCurrName = Then

' Noactive connection exists

RenameConnection = False

Exit Function

End If

if sCurrName <> sNewName Then

RenameConnection = ELS_QBCtrl.SetConnectionName(sNewName)

Exit Function

End If

   End Function