共用方式為


DataConnectionFactory.CreateDataConnection(Guid, String, Boolean) Method

Definition

Creates a new instance of the DataConnection class with the specified connection information.

public:
 Microsoft::VisualStudio::Data::DataConnection ^ CreateDataConnection(Guid provider, System::String ^ connectionString, bool encryptedString);
public Microsoft.VisualStudio.Data.DataConnection CreateDataConnection (Guid provider, string connectionString, bool encryptedString);
member this.CreateDataConnection : Guid * string * bool -> Microsoft.VisualStudio.Data.DataConnection
Public Function CreateDataConnection (provider As Guid, connectionString As String, encryptedString As Boolean) As DataConnection

Parameters

provider
Guid

The unique identifier of a DDEX provider.

connectionString
String

An unencrypted or encrypted string containing connection information.

encryptedString
Boolean

Indicates whether the connectionString parameter is unencrypted or encrypted. Specifies true if encrypted.

Returns

Returns a specified DataConnectionobject instance.

Exceptions

The cconnectionString parameter is null.

The provider is not a registered DDEX provider.

Applies to