About the Class Library
The Oracle C++ Class Library enables developers writing C++ code to access
Oracle databases easily, quickly, and with a minimum of programming. Visual C++
version 2.X or later are supported on a 32-bit platform.
Users of this library should have some knowledge of C++ and their development
environment. Since Oracle is an object-relational database, access to the data
in the database is most easily accomplished using the SQL language. Therefore,
users of this class library should also have some familiarity with SQL.
However, for simple use of the classes, developers unfamiliar with SQL can learn
enough from the examples in the accompanying Workbook to get started (see the file BOUND.HTM in the ORACLE_HOME\OO4O\CPP\..).
This class library is designed to provide object-oriented access to a
relational database. It is not intended to make the database appear fully
object-oriented. So, for instance, methods are provided for getting data from the database
according to a SQL query. But no methods are provided for inserting C++ objects
directly into the database.
In terms of data types, the level of this interface is low. The data types
supported are the simplest C data types: int, long, double, and char *. There is
no explicit support for higher-level data types, although you will not find it
difficult to provide this support for your own data types. In terms of
operations, the level is high. You can open a connection to an Oracle database simply by
constructing an ODatabase object. You can obtain an entire set of record from the database by
constructing an ODynaset object. You can navigate forward and backward through sets of records
returned from the query. A high-level interface gives the Visual C++ programmer much
of the power of the Visual Basic programmer, with bound objects and an
interaction model.
The class library was designed to provide ease of connectivity to an Oracle
database. The objects will handle most mundane tasks. For instance:
· you do not have to log off from the database because the ODatabase object destructor will do that for you.
· you do not have to manage memory: the only memory you need to free is the
memory you allocate.
· you do not need to run any special tools to build your code.
See the following topics:
A Simple Example
About Binding
Class Naming Conventions
Error Handling
Initializing and Uninitializing the Library
Layers of the Library
Memory Ownership Conventions
Objects as Handles
Supported Data Types