DB2Connection Methods
The methods of the DB2Connection class are listed here. For a complete list of DB2Connection class members, see the DB2Connection Members topic.
Public Methods
| Method | Description |
|---|---|
BeginTransaction |
Overloaded. Begins a transaction at the database. |
ChangeDatabase |
Changes the current database associated with an open DB2®Connection . |
ClearUSRLIBLCache |
Clears the current *USRLIBL cache for connection to Db2 for IBM i. |
Close |
Closes the connection to the database. This is the preferred method of closing any open connection. |
CreateCommand |
Creates and returns a DB2Command object associated with the DB2Connection . |
CreateObjRef (inherited from MarshalByRefObject) |
Creates an object that contains all the relevant information required to generate a proxy used to communicate with a remote object. |
DropDTD |
Drops the DTD registered with the database. |
DropXmlSchema |
Drops the schema registered with the database. |
Dispose (inherited from Component) |
Overloaded. Releases the resources used by the Component. |
EnlistDistributedTransaction |
Enlists in the specified transaction as a distributed transaction. |
EnlistTransaction (inherited
from DbConnection) |
Overloaded. Enlists in the specified transaction. |
Equals (inherited from Object) |
Overloaded. Determines whether two Object instances are equal. |
GetDTD |
Gets the DTD registered with the database. |
GetHashCode (inherited from Object) |
Serves as a hash function for a particular type, suitable for use in hashing algorithms and data structures like a hash table. |
GetLifetimeService (inherited
from MarshalByRefObject) |
Retrieves the current lifetime service object that controls the lifetime policy for this instance. |
GetType (inherited from Object) |
Gets the Type of the current instance. |
GetSchema() |
Overloaded. Returns a DataTable with metadata for the data source associated with this DB2Connection instance. |
GetXmlSchemaSet |
Gets the schema registered with the database. |
InitializeLifetimeService (inherited
from MarshalByRefObject) |
Obtains a lifetime service object to control the lifetime policy for this instance. |
Open |
Opens a connection to a database with the property settings specified by the ConnectionString. |
RegisterDTD |
Registers the DTD with the database. |
RegisterXmlSchema |
Overloaded. Registers the schema with the database, including the URLs for the files that contain the XML document property data, and a URL for the file that contains the XML schema properties document. |
ReleaseObjectPool |
Indicates that the DB2Connection object pool can be released when the last underlying connection is released. |
ToString (inherited from Object) |
Returns a String that represents the current Object. |
Protected Methods
| Method | Description |
|---|---|
Dispose |
Overloaded. Overridden. Releases the resources used by the DB2Connection . |
Finalize (inherited from Object) |
Overridden. Allows an Object to
attempt to free resources and perform other cleanup operations before
the Object is reclaimed by garbage collection. In C# and Microsoft(R) Visual C++(R), finalizers are expressed using destructor syntax. |
GetService (inherited from Component) |
Returns an object that represents a service provided by the Component or by its Container. |
MemberwiseClone (inherited
from Object) |
Creates a shallow copy of the current Object. |