From Wikibooks, open books for an open world
Connect to a database by using specific database connection objects.
Enumerate through instances of Microsoft SQL Server by using the DbProviderFactories.GetFactoryClasses method.
Open a connection by using the Open method of a connection object.
Close a connection by using the connection object.
Secure a connection to protect access to your data source.
Create a connection designed for reuse in a connection pool.
Control connection pooling by configuring ConnectionString values based on database type.
Handle connection exceptions when connecting to a database.