SqlConnection Methods

SqlConnection Methods

 

Namespace:   System.Data.SqlClient
Assembly:  System.Data (in System.Data.dll)

NameDescription
System_CAPS_pubmethodBeginTransaction()

Starts a database transaction.

System_CAPS_pubmethodBeginTransaction(IsolationLevel)

Starts a database transaction with the specified isolation level.

System_CAPS_pubmethodBeginTransaction(IsolationLevel, String)

Starts a database transaction with the specified isolation level and transaction name.

System_CAPS_pubmethodBeginTransaction(String)

Starts a database transaction with the specified transaction name.

System_CAPS_pubmethodChangeDatabase(String)

Changes the current database for an open SqlConnection.(Overrides DbConnection.ChangeDatabase(String).)

System_CAPS_pubmethodSystem_CAPS_staticChangePassword(String, SqlCredential, SecureString)

Changes the SQL Server password for the user indicated in the SqlCredential object.

System_CAPS_pubmethodSystem_CAPS_staticChangePassword(String, String)

Changes the SQL Server password for the user indicated in the connection string to the supplied new password.

System_CAPS_pubmethodSystem_CAPS_staticClearAllPools()

Empties the connection pool.

System_CAPS_pubmethodSystem_CAPS_staticClearPool(SqlConnection)

Empties the connection pool associated with the specified connection.

System_CAPS_pubmethodClose()

Closes the connection to the database. This is the preferred method of closing any open connection.(Overrides DbConnection.Close().)

System_CAPS_pubmethodCreateCommand()

Creates and returns a SqlCommand object associated with the SqlConnection.

System_CAPS_pubmethodCreateObjRef(Type)

Creates an object that contains all the relevant information required to generate a proxy used to communicate with a remote object.(Inherited from MarshalByRefObject.)

System_CAPS_pubmethodDispose()

Releases all resources used by the Component.(Inherited from Component.)

System_CAPS_pubmethodEnlistDistributedTransaction(ITransaction)

Enlists in the specified transaction as a distributed transaction.

System_CAPS_pubmethodEnlistTransaction(Transaction)

Enlists in the specified transaction as a distributed transaction.(Overrides DbConnection.EnlistTransaction(Transaction).)

System_CAPS_pubmethodEquals(Object)

Determines whether the specified object is equal to the current object.(Inherited from Object.)

System_CAPS_pubmethodGetHashCode()

Serves as the default hash function. (Inherited from Object.)

System_CAPS_pubmethodGetLifetimeService()

Retrieves the current lifetime service object that controls the lifetime policy for this instance.(Inherited from MarshalByRefObject.)

System_CAPS_pubmethodGetSchema()

Returns schema information for the data source of this SqlConnection. For more information about scheme, see SQL Server Schema Collections.(Overrides DbConnection.GetSchema().)

System_CAPS_pubmethodGetSchema(String)

Returns schema information for the data source of this SqlConnection using the specified string for the schema name.(Overrides DbConnection.GetSchema(String).)

System_CAPS_pubmethodGetSchema(String, String[])

Returns schema information for the data source of this SqlConnection using the specified string for the schema name and the specified string array for the restriction values.(Overrides DbConnection.GetSchema(String, String[]).)

System_CAPS_pubmethodGetType()

Gets the Type of the current instance.(Inherited from Object.)

System_CAPS_pubmethodInitializeLifetimeService()

Obtains a lifetime service object to control the lifetime policy for this instance.(Inherited from MarshalByRefObject.)

System_CAPS_pubmethodOpen()

Opens a database connection with the property settings specified by the ConnectionString.(Overrides DbConnection.Open().)

System_CAPS_pubmethodOpenAsync()

An asynchronous version of Open, which opens a database connection with the settings specified by the ConnectionString. This method invokes the virtual method OpenAsync with CancellationToken.None.(Inherited from DbConnection.)

System_CAPS_pubmethodOpenAsync(CancellationToken)

An asynchronous version of Open, which opens a database connection with the property settings specified by the ConnectionString. The cancellation token can be used to request that the operation be abandoned before the connection timeout elapses. Exceptions will be propagated via the returned Task. If the connection timeout time elapses without successfully connecting, the returned Task will be marked as faulted with an Exception. The implementation returns a Task without blocking the calling thread for both pooled and non-pooled connections.(Overrides DbConnection.OpenAsync(CancellationToken).)

System_CAPS_pubmethodSystem_CAPS_staticRegisterColumnEncryptionKeyStoreProviders(IDictionary<String, SqlColumnEncryptionKeyStoreProvider>)

Registers the column encryption key store providers.

System_CAPS_pubmethodResetStatistics()

If statistics gathering is enabled, all values are reset to zero.

System_CAPS_pubmethodRetrieveStatistics()

Returns a name value pair collection of statistics at the point in time the method is called.

System_CAPS_pubmethodToString()

Returns a String containing the name of the Component, if any. This method should not be overridden.(Inherited from Component.)

NameDescription
System_CAPS_pubinterfaceSystem_CAPS_privmethodIDbConnection.BeginTransaction()

Begins a database transaction.(Inherited from DbConnection.)

System_CAPS_pubinterfaceSystem_CAPS_privmethodIDbConnection.BeginTransaction(IsolationLevel)

Begins a database transaction with the specified IsolationLevel value.(Inherited from DbConnection.)

System_CAPS_pubinterfaceSystem_CAPS_privmethodIDbConnection.CreateCommand()

Creates and returns a DbCommand object that is associated with the current connection.(Inherited from DbConnection.)

System_CAPS_pubinterfaceSystem_CAPS_privmethodICloneable.Clone()

Creates a new object that is a copy of the current instance.

Return to top
Show:
© 2016 Microsoft