Partager via


DataConnectionManager.GetDataConnection Method (Guid, String, Boolean, Boolean)

Retrieves a data connection that is equivalent to the specified connection information, with an indication whether the connection information is updated.

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

Syntax

'Declaration
Public Function GetDataConnection ( _
    provider As Guid, _
    connectionString As String, _
    encryptedString As Boolean, _
    update As Boolean _
) As DataConnection
public DataConnection GetDataConnection(
    Guid provider,
    string connectionString,
    bool encryptedString,
    bool update
)
public:
DataConnection^ GetDataConnection(
    Guid provider, 
    String^ connectionString, 
    bool encryptedString, 
    bool update
)
member GetDataConnection : 
        provider:Guid * 
        connectionString:string * 
        encryptedString:bool * 
        update:bool -> DataConnection
public function GetDataConnection(
    provider : Guid, 
    connectionString : String, 
    encryptedString : boolean, 
    update : boolean
) : DataConnection

Parameters

  • provider
    Type: System.Guid

    A DDEX data provider GUID.

  • connectionString
    Type: System.String

    A connection string recognized by the data provider.

  • encryptedString
    Type: System.Boolean

    Indicates whether the connection string parameter is encrypted (true if encrypted).

  • update
    Type: System.Boolean

    Indicates whether the connection information is updated

Return Value

Type: Microsoft.VisualStudio.Data.DataConnection
Returns a DataConnection object instance representing the requested connection.

Remarks

This overloaded GetDataConnection method is useful in a scenario in which a client is using a connection from the connection manager and provides the ability for a Visual Studio user to modify the connection. In this narrow scenario, the client needs the ability to update the connection stored in the connection manager with the modified (but equivalent) connection.

.NET Framework Security

See Also

Reference

DataConnectionManager Class

GetDataConnection Overload

Microsoft.VisualStudio.Data Namespace