Working with Connection StringsĀ 

A connection string contains initialization information that is passed as a parameter from a data provider to a data source. The syntax varies depending on the data provider, and the connection string is parsed immediately after being set. Syntax errors will generate a run-time exception, but other errors can be found only after the data source has validated the information in the connection string. Once validated, the data source sets various connection string options that enable the connection and allow it to be opened. The .NET Framework 2.0 provides new capabilities for working with connection strings, ranging from the introduction of new keywords to the ConnectionStringBuilder classes which facilitate building valid connection strings at runtime based on user input.

In This Section

  • Building Connection Strings
    Describes how to use the ConnectionStringBuilder classes to construct valid connection strings at runtime.

See Also

Concepts

Connecting to a Data Source
Securing Connection Strings