Database::OpenConnectionString Method (String)
Opens a connection to a database using the specified connection string.
Assembly: WebMatrix.Data (in WebMatrix.Data.dll)
Parameters
- connectionString
- Type: System::String
The connection string that contains information that is used to connect to a database.
| Exception | Condition |
|---|---|
| ArgumentException | connectionString is nullptr or empty. |
The OpenConnectionString method differs from the Open method, which uses the name of a connection string that is stored in the Web.config file.
You might use the OpenConnectionString method when a connection string is programmatically generated or is provided by the user.
Show: