The RWDBConnection::systemHandle() method returns a pointer to a base class from which a family of implementation-specific classes are derived. To use the database API directly, an application downcasts this pointer to the appropriate type, and uses its implementation-specific features. Naturally, this usage reduces an application's portability.
For the Oracle8 access library, the implementation-specific system handle has the datatype RWDBOracle8SystemHandle. It contains the OCI8 handles associated with the RWDBConnection. The following methods may be used to retrieve these components:
OCIError *errorHandle(); OCIEnv *ociEnvh(); OCISvcCtx *ociServerContext(); OCIServer *serverHandle();
Each RWDBConnection maintains a separate OCISvcCtx* in order to facilitate transaction processing with beginTransaction(), commitTransaction(), and rollbackTransaction().
RWDBOracle8SystemHandle offers mutators for piecewise size and maximum blob size. These functions are:
size_t piecewiseSize() const; size_t piecewiseSize(size_t size); size_t maximumBlobSize() const; size_t maximumBlobSize(size_t newSize);
The piecewise size is used internally when the data size is very large (LONG/LONG RAW or CLOB/BLOB). Size can be reset and retrieved through piecewise size mutators. The default piecewise size is 32kb. The maximum blob size is used when retrieving large-sized data (LONG/LONG RAW or CLOB/BLOB). The default size is 32kb - 1.
If it is necessary for your application to make calls directly to OCI, proceed as in the following example:
#include <rw/db/or8src/or8sysh.h> RWDBConnection or8Connect = myDbase.connection(); RWDBOracle8SystemHandle* handle = (RWDBOracle8SystemHandle*)or8Connect.systemHandle(); OCIEnv* env = handle->ociEnvh(); // use the OCIEnv pointer for Oracle8 OCI calls
Please be aware of the complications associated with making direct OCI calls, as the internal logic of the Oracle8 access library is not used.
Also note that your application must be compiled with an include path to the Oracle8 library include files.
©Copyright 2000, Rogue Wave Software, Inc.
Contact Rogue Wave about documentation or support issues.