The connection to the database is handled by the Connection class. Statement execution is handled by the Select_Stmt and Non_Sel_Stmt classes, which are both derived from the abstract class Stmt.
Using Ora++ to access the Oracle server involves the following basic steps:
Create a connection object. See Connection() Section 3.2.1.1.
Create and execute various Stmt-derived objects.
Commit or roll back your changes. See commit() Section 3.2.1.3 and rollback() Section 3.2.1.6.
Once a database connection is open, the execution of a SELECT statement involves the following steps:
Create the statement object. See Select_Stmt() Section 3.4.1.1.
Bind input and output host variables to placeholders. See bind() Section 3.3.1.2.
Bind output host variables to columns in the SELECT list. See bind_col() Section 3.4.1.2.
Execute the statement. See exec() Section 3.3.1.5.
Fetch the rows. See fetch() Section 3.4.1.4.
Statements other than SELECT are simpler and involve the following steps:
Create the statement object. See Non_Sel_Stmt() Section 3.6.1.1.
Bind input and output host variables to placeholders. See bind() Section 3.3.1.2.
Execute the statement. See exec() Section 3.3.1.5.
Methods are provided to explicitly close Connection and Stmt objects, but this step is performed by their respective constructors and is not required. Be aware, however, that Connection::close() performs a rollback, whether or not you explicitly call it.