IVsDataConnectionManager Interface

Represents a shared set of data connection objects that are created on demand and managed by Visual Studio.

Namespace:  Microsoft.VisualStudio.Data.Services
Assembly:  Microsoft.VisualStudio.Data.Services (in Microsoft.VisualStudio.Data.Services.dll)

Syntax

<GuidAttribute("42503C6C-3D54-4986-BC13-AE6855CE89B8")> _
Public Interface IVsDataConnectionManager

Dim instance As IVsDataConnectionManager
[GuidAttribute("42503C6C-3D54-4986-BC13-AE6855CE89B8")]
public interface IVsDataConnectionManager
[GuidAttribute(L"42503C6C-3D54-4986-BC13-AE6855CE89B8")]
public interface class IVsDataConnectionManager
public interface IVsDataConnectionManager

Remarks

Because of the architecture of VSPackages and the Visual Studio services model, it is difficult to pass objects, such as data connections, that one would typically use globally. Normally, an application makes a single connection to a database and then uses it throughout. In Visual Studio, different features are implemented in different VSPackages, so the only way to connect features is by using Visual Studio services.

If one feature, for example Server Explorer, creates a connection for use at design time, and another feature, for example the Data Source Wizard or Dataset Designer, wants to use this connection, these latter features need a way to access the connection that was created in Server Explorer.

The Data Connection Manager lets you share these connections, so long as the client has a way to identify the connection. This identifying information is a DDEX provider GUID and a connection string.

A typical Data Connection Manager scenario is implementing drag and drop operations, where the Clipboard object is created with the DDEX provider and connection string information and the code accepting the drop uses this information to look up a matching connection.

A designer is typically expected to pass DDEX provider and connection string information; then, when it needs to use a connection for design-time purposes, it calls into the Data Connection Manager to retrieve a connection by using the information.

The Data Connection Manager is a globally registered Visual Studio service.

See Also

Reference

IVsDataConnectionManager Members

Microsoft.VisualStudio.Data.Services Namespace

IVsDataConnection

IVsDataConnectionFactory