Επεξεργασία

Κοινή χρήση μέσω


DesignerDataConnection Constructors

Definition

Initializes a new instance of the DesignerDataConnection class.

Overloads

DesignerDataConnection(String, String, String)

Initializes a new instance of the DesignerDataConnection class with the specified name, data provider, and connection string.

DesignerDataConnection(String, String, String, Boolean)

Initializes a new instance of the DesignerDataConnection class with the specified name, data provider, and connection string, and indicates whether the connection was loaded from a configuration file.

DesignerDataConnection(String, String, String)

Initializes a new instance of the DesignerDataConnection class with the specified name, data provider, and connection string.

public:
 DesignerDataConnection(System::String ^ name, System::String ^ providerName, System::String ^ connectionString);
public DesignerDataConnection (string name, string providerName, string connectionString);
new System.ComponentModel.Design.Data.DesignerDataConnection : string * string * string -> System.ComponentModel.Design.Data.DesignerDataConnection
Public Sub New (name As String, providerName As String, connectionString As String)

Parameters

name
String

The name associated with this connection.

providerName
String

The name of the provider object used to access the underlying data store.

connectionString
String

The string that specifies how to connect to the data store.

Remarks

Use this constructor to create DesignerDataConnection objects that are not created from the application's configuration file. When you use this constructor, the IsConfigured property is set to false.

Applies to

DesignerDataConnection(String, String, String, Boolean)

Initializes a new instance of the DesignerDataConnection class with the specified name, data provider, and connection string, and indicates whether the connection was loaded from a configuration file.

public:
 DesignerDataConnection(System::String ^ name, System::String ^ providerName, System::String ^ connectionString, bool isConfigured);
public DesignerDataConnection (string name, string providerName, string connectionString, bool isConfigured);
new System.ComponentModel.Design.Data.DesignerDataConnection : string * string * string * bool -> System.ComponentModel.Design.Data.DesignerDataConnection
Public Sub New (name As String, providerName As String, connectionString As String, isConfigured As Boolean)

Parameters

name
String

The name associated with this connection.

providerName
String

The name of the provider object used to access the underlying data store.

connectionString
String

The string that specifies how to connect to the data store.

isConfigured
Boolean

true to indicate the connection was created from information stored in the application's configuration file; otherwise, false.

Remarks

Use this constructor when you need to specify the value of the IsConfigured property, such as when you are creating a DesignerDataConnection object from information stored in the application's configuration file. The IsConfigured property is set to the value of the isConfigured parameter.

Applies to