EnableBuffering Method
Applies To
OBlob
OClob
Description
Enables buffering of LOB operations.
Usage
void EnableBuffering(void) const throw(OException)
Arguments
Remarks
When enabled, buffering uses the Lob Buffering subsystem to minimize network round-trips by buffering changes until the FlushBuffers method is called. This can be especially beneficial to applications that perform a series of repeated small reads and writes to specific areas of a LOB. See the DisableBuffering method.
There are many caveats and restrictions in using LOB buffering. These are summarized here, but for complete information, refer to the Oracle Application Developers Guide on Large Objects (LOBs).
- The following LOB methods cannot be used while buffering is enabled: Append, Copy (to Clob or Blob), Erase, Size, Trim, CopyFromBfile, CopyFromFile, and CopyToFile.
- There is currently a 512k limit to the amount of a single read/write operation.
- Error reporting for buffered operations are delayed until the next server access.
- Transactional support is not guaranteed. User must rollback changes manually in the case of an error.
- It is the users responsibility not to perform updates to a LOB column that bypasses the buffering system while in the same transaction as a buffer-enabled LOB . This could occur if the user performs an INSERT statement.
- Only one LOB object is allowed to perform buffered writes to a given LOB. Other LOB objects that point to the same LOB will raise an error if they attempt a buffered write.
- A Lob object taken from an OraParameter will raise an error if it is buffer-enabled and bound to an OUT parameter.
- The Clone method can raise an error for buffer enabled LOBs.
- Appending directly to the end of the LOB is allowed, but any write whose offset extends beyond the end of the LOB and results in blank padding (for CLOB) or zero padding (for BLOB) will raise an error.