SqlConnection
Represents a connection to a SQL Server database. This class cannot be inherited.
The connection ID of the most recent connection attempt, regardless of whether the attempt succeeded or failed.
Gets or sets the FireInfoMessageEventOnUserErrors property.
Gets the size (in bytes) of network packets used to communicate with an instance of SQL Server.
When set to true, enables statistics gathering for the current connection.
Gets a string that identifies the database client.
Occurs when SQL Server returns a warning or informational message.
public SqlConnection()
Initializes a new instance of the SqlConnection class.
Initializes a new instance of the SqlConnection class when given a string that contains the connection string.
public static void ChangePassword(string connectionString, SqlCredential credential, SecureString newPassword)
Empties the connection pool.
Empties the connection pool associated with the specified connection.
Starts a database transaction.
Starts a database transaction with the specified isolation level.
Starts a database transaction with the specified isolation level and transaction name.
Starts a database transaction with the specified transaction name.
Creates and returns a SqlCommand object associated with the SqlConnection.
If statistics gathering is enabled, all values are reset to zero.
Returns a name value pair collection of statistics at the point in time the method is called.