OdbcConnectionStringBuilder Constructor (String^)
Initializes a new instance of the OdbcConnectionStringBuilder class. The provided connection string provides the data for the instance's internal connection information.
Assembly: System.Data (in System.Data.dll)
Parameters
- connectionString
-
Type:
System::String^
The basis for the object's internal connection information. Parsed into key/value pairs.
| Exception | Condition |
|---|---|
| ArgumentException | The connection string is incorrectly formatted (perhaps missing the required "=" within a key/value pair). |
You can pass a connection string in the constructor, or you can set the ConnectionString property explicitly. The behavior is the same either way.
The following example creates multiple OdbcConnectionStringBuilder instances, passing a different connection string to the constructor in each case. Note that the ordering of elements within the connection string may be modified when you retrieve the ConnectionString property. Also note that keys other than the predefined "Dsn" and "Driver" keys are converted to lowercase by the OdbcConnectionStringBuilder class.
Note |
|---|
This example includes a password to demonstrate how OdbcConnectionStringBuilder works with connection strings. In your applications, we recommend that you use Windows Authentication. If you must use a password, do not include a hard-coded password in your application. |
Available since 2.0
