Connections Method

Provides access to the Connections collection of the Workspace object.

Applies to objects: Workspace.

Syntax

[[Set] RetVal = ] object.Connections()

The Connections method syntax has these parts:

Part Description
object Required. A reference to an instance of the object.
RetVal Optional. A Connections type variable.

Example

' Declare and initialize variables
Dim engine As DBEngine Set engine = new DBEngine Dim wspace As Workspaces Set wspace = engine.CreateWorkspace("MyWorkspace") ' Create connection Dim conn As Connection Set conn = wspace.OpenConnection("MyConnection", false, false, "ODBC; UID=mylogin; PWD=mypassword; DSN=SQLBaseDSN") '... ' Get the Connections collection Dim cscoll As Connections Set cscoll = wspace.Connections() '...

 

See Also

Connection Object, Connections Object, Workspace Object.