10.12.2012 Views

Oracle C++ Call Interface Programmer's Guide

Oracle C++ Call Interface Programmer's Guide

Oracle C++ Call Interface Programmer's Guide

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Clob Class<br />

Clob Class<br />

The Clob class defines the common properties of objects of type CLOB. A CLOB is a<br />

large character object stored as a column value in a row of a database table. A Clob<br />

object contains a logical pointer to a CLOB, not the CLOB itself.<br />

Methods of the Clob class enable you to perform specific tasks related to Clob<br />

objects, including methods for getting the length of a SQL CLOB, for materializing a<br />

CLOB on the client, and for extracting a part of the CLOB.<br />

Methods in the ResultSet and Statement classes, such as getClob() and<br />

setClob(), enable you to access an SQL CLOB value.<br />

To create a null Clob object, use the syntax:<br />

Clob();<br />

The only methods valid on a null Clob object are setNull(), isNull(), and<br />

operator=().<br />

To create an uninitialized Clob object, use the syntax:<br />

Clob(const Connection *connectionp);<br />

An uninitialized Clob object can be initialized by:<br />

■ The setEmpty() method. The CLOB can then be modified by inserting this<br />

CLOB into the table and retrieving it using SELECT ... FOR UPDATE. The<br />

write() method will modify the CLOB; however, the modified data will be<br />

flushed to the table only when the transaction is committed. Note that an<br />

insert is not required.<br />

■ Assigning an initialized Clob object to it.<br />

To create a copy of a Clob object, use the syntax:<br />

Clob(const Clob &srcClob);<br />

Summary of Clob Methods<br />

Table 8–5 Clob Methods<br />

Method Summary<br />

append() on page 8-28 Append a CLOB at the end of the current CLOB.<br />

8-26 <strong>Oracle</strong> <strong>C++</strong> <strong>Call</strong> <strong>Interface</strong> Programmer’s <strong>Guide</strong>

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!