DbConnection Methods

DbConnection Methods

 

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

NameDescription
System_CAPS_protmethodBeginDbTransaction(IsolationLevel)

Starts a database transaction.

System_CAPS_pubmethodBeginTransaction()

Starts a database transaction.

System_CAPS_pubmethodBeginTransaction(IsolationLevel)

Starts a database transaction with the specified isolation level.

System_CAPS_pubmethodChangeDatabase(String)

Changes the current database for an open connection.

System_CAPS_pubmethodClose()

Closes the connection to the database. This is the preferred method of closing any open connection.

System_CAPS_pubmethodCreateCommand()

Creates and returns a DbCommand object associated with the current connection.

System_CAPS_protmethodCreateDbCommand()

Creates and returns a DbCommand object associated with the current connection.

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_protmethodDispose(Boolean)

Releases the unmanaged resources used by the Component and optionally releases the managed resources.(Inherited from Component.)

System_CAPS_pubmethodEnlistTransaction(Transaction)

Enlists in the specified transaction.

System_CAPS_pubmethodEquals(Object)

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

System_CAPS_protmethodFinalize()

Releases unmanaged resources and performs other cleanup operations before the Component is reclaimed by garbage collection.(Inherited from Component.)

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 DbConnection.

System_CAPS_pubmethodGetSchema(String)

Returns schema information for the data source of this DbConnection using the specified string for the schema name.

System_CAPS_pubmethodGetSchema(String, String[])

Returns schema information for the data source of this DbConnection using the specified string for the schema name and the specified string array for the restriction values.

System_CAPS_protmethodGetService(Type)

Returns an object that represents a service provided by the Component or by its Container.(Inherited from Component.)

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_protmethodMemberwiseClone()

Creates a shallow copy of the current Object.(Inherited from Object.)

System_CAPS_protmethodMemberwiseClone(Boolean)

Creates a shallow copy of the current MarshalByRefObject object.(Inherited from MarshalByRefObject.)

System_CAPS_protmethodOnStateChange(StateChangeEventArgs)

Raises the StateChange event.

System_CAPS_pubmethodOpen()

Opens a database connection with the settings specified by the ConnectionString.

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.

System_CAPS_pubmethodOpenAsync(CancellationToken)

This is the asynchronous version of Open. Providers should override with an appropriate implementation. The cancellation token can optionally be honored.

The default implementation invokes the synchronous Open call and returns a completed task. The default implementation will return a cancelled task if passed an already cancelled cancellationToken. Exceptions thrown by Open will be communicated via the returned Task Exception property.

Do not invoke other methods and properties of the DbConnection object until the returned Task is complete.

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.

System_CAPS_pubinterfaceSystem_CAPS_privmethodIDbConnection.BeginTransaction(IsolationLevel)

Begins a database transaction with the specified IsolationLevel value.

System_CAPS_pubinterfaceSystem_CAPS_privmethodIDbConnection.CreateCommand()

Creates and returns a DbCommand object that is associated with the current connection.

Return to top
Show:
© 2016 Microsoft