The following example uses the SqlConnection class to connect to a database.
The connection string (connectionString), Data Source, Initial Catalog, User ID and Password properties. The SqlConnection object is defined within the using statement, so it is automatically disposed of once the database connection operation is complete.
Comments
Leave a Comment