Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Base Class Members
Data Members
Open Database Connectivity (ODBC) connection handle to a data source. Type HDBC. |
Construction
Constructs a CDatabase object. You must initialize the object by calling OpenEx or Open. |
|
Closes the data source connection. |
|
Establishes a connection to a data source (through an ODBC driver). |
|
Establishes a connection to a data source (through an ODBC driver). |
Database Attributes
Returns nonzero if the data source supports transactions. |
|
Returns nonzero if the CDatabase object is updatable (not read-only). |
|
Identifies the operations through which bookmarks persist on recordset objects. |
|
Returns the ODBC connection string used to connect the CDatabase object to a data source. |
|
Identifies the effect of committing a transaction on an open recordset object. |
|
Identifies the effect of rolling back a transaction on an open recordset object. |
|
Returns the name of the database currently in use. |
|
Returns nonzero if the CDatabase object is currently connected to a data source. |
|
Sets the number of seconds after which a data source connection attempt will time out. |
|
Sets the number of seconds after which database query operations will time out. Affects all subsequent recordset Open, AddNew, Edit, and Delete calls. |
Database Operations
Starts a "transaction" — a series of reversible calls to the AddNew, Edit, Delete, and Update member functions of class CRecordset — on the connected data source. The data source must support transactions for BeginTrans to have any effect. |
|
Allows you to bind parameters before calling CDatabase::ExecuteSQL. |
|
Cancels an asynchronous operation or a process from a second thread. |
|
Completes a transaction begun by BeginTrans. Commands in the transaction that alter the data source are carried out. |
|
Executes a SQL statement. No data records are returned. |
|
Reverses changes made during the current transaction. The data source returns to its previous state, as defined at the BeginTrans call, unaltered. |
Database Overridables
Called by the framework to set standard connection options. The default implementation sets the query timeout value. You can establish these options ahead of time by calling SetQueryTimeout. |