Share via


DataExplorerConnectionManager.AddConnection Method

Definition

Adds a new connection to the Server Explorer window with the specified connection settings.

public:
 abstract Microsoft::VisualStudio::Data::DataExplorerConnection ^ AddConnection(System::String ^ connectionName, Guid provider, System::String ^ connectionString, bool encryptedString);
public abstract Microsoft.VisualStudio.Data.DataExplorerConnection AddConnection (string connectionName, Guid provider, string connectionString, bool encryptedString);
abstract member AddConnection : string * Guid * string * bool -> Microsoft.VisualStudio.Data.DataExplorerConnection
Public MustOverride Function AddConnection (connectionName As String, provider As Guid, connectionString As String, encryptedString As Boolean) As DataExplorerConnection

Parameters

connectionName
String

The initial name to use for the root connection node. If null, a generated name is used.

provider
Guid

The unique identifier of a data provider.

connectionString
String

An unencrypted or encrypted string containing connection information.

encryptedString
Boolean

An indication whether the connectionString parameter is unencrypted or encrypted.

Returns

Returns a DataExplorerConnection object instance with specified setting, representing a new connection (or existing connection if a connection with equivalent settings already exists).

Exceptions

The connectionString parameter is null.

The provider is not a registered DDEX provider.

Applies to