Oracle Objects for OLE C++ Class Library
Release 9.2

Part Number A95896-01
Go To Documentation Library
Home
Go To Product List
Book List
Go To Table Of Contents
Contents

Master Index

Feedback

OBlob, OClob

The OBlob and OClob objects provide methods for performing operations on large objects in the database of data types BLOB, CLOB, and NCLOB. In this help file BLOB, CLOB, and NCLOB datatypes are also referred to as LOB datatypes.

Remarks

LOB data is accessed using Read and the CopyToFile methods.

LOB data is modified using Write, Append, Erase, Trim, Copy , CopyFromFile, and CopyFromBFile methods. Before modifying the content of a LOB column in a row, a row lock must be obtained. If the LOB column is a field of an ODynaset, then the lock is obtained by invoking the StartEdit method.

None of the LOB operations are allowed on NULL LOBs. To avoid errors, this may be detected via the IsNull property. To perform write operations on a LOB that is NULL, the LOB column must first be initialized with an Empty value. Also, to insert a new row having a non-null LOB column, the LOB column must first be updated with an Empty value.

To initialize with an Empty value, set the Value property of the OField/OParameter object to an OValue object on which you have called SetEmpty and commit the change to the database. Also, the newly updated Empty LOB must be reselected from the database before it can be used. This is done automatically in the case of ODynaset. If a LOB field in an ODynaset is set to Empty and the Update method called, OO4O will automatically re-select the Empty LOB into the dynaset making it available for use in subsequent write operations.

Temporary LOBs are LOBs which do not exist permanently in the database. OO4O programmers most commonly use them to pass into stored procedures and functions which have LOB arguments. For more information see the constructors below.

The OBlob and OClob classes support the following methods:

Construction and destruction:

OBlob

~OBlob

OClob

~OClob

operator=

Attributes:

GetSize
IsNull
IsOpen

operator==
operator!=

Operations:

Append
Clone

Close
Compare

CopyFromBfile
CopyFromBlob
CopyFromClob
CopyFromFile
CopyToFile
DisableBuffering
DisableStreaming

EnableBuffering
EnableStreaming
Erase
FlushBuffer

GetOptimumChunkSize
MatchPos
Read
Trim
Write

Examples

Example: Reading a Blob

Example: Reading a Clob

Example: Writing a Blob

Example: Writing a Clob


 
Oracle
Copyright © 1998, 2002 Oracle Corporation.

All Rights Reserved.
Go To Documentation Library
Home
Go To Product List
Book List
Go To Table Of Contents
Contents

Master Index

Feedback