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
public method BeginTransaction Overloaded. Begins a transaction at the database.
public method ChangeDatabase Changes the current database associated with an open DB2®Connection .
public method ClearUSRLIBLCache Clears the current *USRLIBL cache for connection to Db2 for IBM i.
public method Close Closes the connection to the database. This is the preferred method of closing any open connection.
public method CreateCommand Creates and returns a DB2Command object associated with the DB2Connection .
public method 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.
public method DropDTD Drops the DTD registered with the database.
public method DropXmlSchema Drops the schema registered with the database.
public method Dispose (inherited from Component) Overloaded. Releases the resources used by the Component.
public method EnlistDistributedTransaction Enlists in the specified transaction as a distributed transaction.
public method EnlistTransaction (inherited from DbConnection) Overloaded. Enlists in the specified transaction.
public method Equals (inherited from Object) Overloaded. Determines whether two Object instances are equal.
public method GetDTD Gets the DTD registered with the database.
public method 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.
public method GetLifetimeService (inherited from MarshalByRefObject) Retrieves the current lifetime service object that controls the lifetime policy for this instance.
public method GetType (inherited from Object) Gets the Type of the current instance.
public method GetSchema() Overloaded. Returns a DataTable with metadata for the data source associated with this DB2Connection instance.
public method GetXmlSchemaSet Gets the schema registered with the database.
public method InitializeLifetimeService (inherited from MarshalByRefObject) Obtains a lifetime service object to control the lifetime policy for this instance.
public method Open Opens a connection to a database with the property settings specified by the ConnectionString.
public method RegisterDTD Registers the DTD with the database.
public method 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.
public method static (Shared in Visual Basic) ReleaseObjectPool Indicates that the DB2Connection object pool can be released when the last underlying connection is released.
public method ToString (inherited from Object) Returns a String that represents the current Object.

Protected Methods

Method Description
protected method Dispose Overloaded. Overridden. Releases the resources used by the DB2Connection .
protected method 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.

protected method GetService (inherited from Component) Returns an object that represents a service provided by the Component or by its Container.
protected method MemberwiseClone (inherited from Object) Creates a shallow copy of the current Object.