Partager via


IVsDataConnectionManager.GetConnection Method (Guid, String, Boolean, Boolean)

Retrieves an existing data connection or creates a new data connection that matches the specified provider GUID and connection string. Also, optionally updates the connection string of the returned connection.

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

Syntax

'Declaration
Function GetConnection ( _
    provider As Guid, _
    connectionString As String, _
    encryptedString As Boolean, _
    update As Boolean _
) As IVsDataConnection
IVsDataConnection GetConnection(
    Guid provider,
    string connectionString,
    bool encryptedString,
    bool update
)
IVsDataConnection^ GetConnection(
    Guid provider, 
    String^ connectionString, 
    bool encryptedString, 
    bool update
)
abstract GetConnection : 
        provider:Guid * 
        connectionString:string * 
        encryptedString:bool * 
        update:bool -> IVsDataConnection
function GetConnection(
    provider : Guid, 
    connectionString : String, 
    encryptedString : boolean, 
    update : boolean
) : IVsDataConnection

Parameters

  • provider
    Type: System.Guid

    The GUID of the DDEX provider.

  • connectionString
    Type: System.String

    The connection string in unencrypted or encrypted form.

  • encryptedString
    Type: System.Boolean

    A Boolean value indicating whether the connection string is encrypted (true) or unencrypted (false).

  • update
    Type: System.Boolean

    A Boolean value indicating whether the data connection's connection string value should be updated with the specified connection string (true) or not (false).

Return Value

Type: Microsoft.VisualStudio.Data.Services.IVsDataConnection
An IVsDataConnection object representing the data connection.

.NET Framework Security

See Also

Reference

IVsDataConnectionManager Interface

GetConnection Overload

Microsoft.VisualStudio.Data.Services Namespace