DbConnection Members
.NET Framework 3.0
Represents a connection to a database.
The following tables list the members exposed by the DbConnection type.
(see also
Protected Properties
)
Top
| Name | Description | |
|---|---|---|
| ConnectionString | Gets or sets the string used to open the connection. |
| ConnectionTimeout | Gets the time to wait while establishing a connection before terminating the attempt and generating an error. |
| Container | Gets the IContainer that contains the Component.(inherited from Component) |
| Database | Gets the name of the current database after a connection is opened, or the database name specified in the connection string before the connection is opened. |
| DataSource | Gets the name of the database server to which to connect. |
| ServerVersion | Gets a string that represents the version of the server to which the object is connected. |
| Site | Gets or sets the ISite of the Component.(inherited from Component) |
| State | Gets a string that describes the state of the connection. |
| Name | Description | |
|---|---|---|
| CanRaiseEvents | Gets a value indicating whether the component can raise an event.(inherited from Component) |
| DesignMode | Gets a value that indicates whether the Component is currently in design mode.(inherited from Component) |
| Events | Gets the list of event handlers that are attached to this Component.(inherited from Component) |
(see also
Protected Methods
)
Top
| Name | Description | |
|---|---|---|
| BeginTransaction | Overloaded. Starts a database transaction. |
| ChangeDatabase | Changes the current database for an open connection. |
| Close | Closes the connection to the database. This is the preferred method of closing any open connection. |
| CreateCommand | Creates and returns a DbCommand object associated with the current connection. |
| CreateObjRef | Creates an object that contains all the relevant information required to generate a proxy used to communicate with a remote object. (inherited from MarshalByRefObject) |
| Dispose | Overloaded. Releases the resources used by the Component. (inherited from Component) |
| EnlistTransaction | Enlists in the specified transaction. |
| Equals | Overloaded. Determines whether two Object instances are equal. (inherited from Object) |
| GetHashCode | Serves as a hash function for a particular type. (inherited from Object) |
| GetLifetimeService | Retrieves the current lifetime service object that controls the lifetime policy for this instance. (inherited from MarshalByRefObject) |
| GetSchema | Overloaded. Returns schema information for the data source of this DbConnection. |
| GetType | Gets the Type of the current instance. (inherited from Object) |
| InitializeLifetimeService | Obtains a lifetime service object to control the lifetime policy for this instance. (inherited from MarshalByRefObject) |
| Open | Opens a database connection with the settings specified by the ConnectionString. |
| ReferenceEquals | Determines whether the specified Object instances are the same instance. (inherited from Object) |
| ToString | Returns a String containing the name of the Component, if any. This method should not be overridden. (inherited from Component) |
| Name | Description | |
|---|---|---|
| BeginDbTransaction | Starts a database transaction. |
| CreateDbCommand | Creates and returns a DbCommand object associated with the current connection. |
| Dispose | Overloaded. Releases the resources used by the Component. (inherited from Component) |
| Finalize | Releases unmanaged resources and performs other cleanup operations before the Component is reclaimed by garbage collection. (inherited from Component) |
| GetService | Returns an object that represents a service provided by the Component or by its Container. (inherited from Component) |
| MemberwiseClone | Overloaded. (inherited from MarshalByRefObject) |
| OnStateChange | Raises the StateChange event. |
| Name | Description | |
|---|---|---|
| Disposed | Occurs when the component is disposed by a call to the Dispose method. (inherited from Component) |
| StateChange | Occurs when the state of the event changes. |
| Name | Description | |
|---|---|---|
| System.Data.IDbConnection.BeginTransaction | Overloaded. |
| System.Data.IDbConnection.CreateCommand |