Getting the connection properties for a connection string
You can use the GetConnectionStringProperties method of the UNICOM Intelligence OLE DB Provider's DataLinkHelper class to get the connection properties for a connection string. For example, in Visual Basic:
DataLinkHelper
GetConnectionStringProperties(ConnectionString As String) As Properties
The OLE DB core components are used to enumerate the properties for the connection string. All of the connection properties for the specified provider are returned, not just the properties included in the connection string. If no provider is specified, the OLE DB Provider for ODBC is used.
Example
The following mrScriptBasic code demonstrates using this method:
Dim Wizard, ConnectionString, Props
' Use the Data Link Properties dialog box to get the connection string
Set Wizard = CreateObject("mrOleDB.DataLinkHelper")
ConnectionString = Wizard.DisplayWizard()
If ConnectionString = "" Then Exit ' User canceled
' Get the properties for the connection string
Set Props = Wizard.GetConnectionStringProperties(ConnectionString)
' Rebuild the connection string
Dim Prop, strProps
For Each Prop in Props
strProps = strProps + Prop.Name + "=" + CText(Prop.Value) + ";"
Next
Requirements
UNICOM Intelligence Data Model
See also