Επεξεργασία

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


SqlConnectionStringBuilder Constructors

Definition

Initializes a new instance of the SqlConnectionStringBuilder class.

Overloads

SqlConnectionStringBuilder()

Initializes a new instance of the SqlConnectionStringBuilder class.

SqlConnectionStringBuilder(String)

Initializes a new instance of the SqlConnectionStringBuilder class. The provided connection string provides the data for the instance's internal connection information.

SqlConnectionStringBuilder()

Source:
System.Data.SqlClient.notsupported.cs

Initializes a new instance of the SqlConnectionStringBuilder class.

public:
 SqlConnectionStringBuilder();
public SqlConnectionStringBuilder ();
Public Sub New ()

See also

Applies to

SqlConnectionStringBuilder(String)

Source:
System.Data.SqlClient.notsupported.cs

Initializes a new instance of the SqlConnectionStringBuilder class. The provided connection string provides the data for the instance's internal connection information.

public:
 SqlConnectionStringBuilder(System::String ^ connectionString);
public SqlConnectionStringBuilder (string connectionString);
new System.Data.SqlClient.SqlConnectionStringBuilder : string -> System.Data.SqlClient.SqlConnectionStringBuilder
Public Sub New (connectionString As String)

Parameters

connectionString
String

The basis for the object's internal connection information. Parsed into name/value pairs. Invalid key names raise KeyNotFoundException.

Exceptions

Invalid key name within the connection string.

Invalid value within the connection string (specifically, when a Boolean or numeric value was expected but not supplied).

The supplied connectionString is not valid.

Remarks

The SqlConnectionStringBuilder class provides a fixed internal collection of key/value pairs. Even if you supply only a small subset of the possible connection string values in the constructor, the object always provides default values for each key/value pair. When the ConnectionString property of the object is retrieved, the string contains only key/value pairs in which the value is not the default value for the item.

See also

Applies to