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.

LOB Classes and Methods<br />

blob.closeStream(instream);<br />

}<br />

}<br />

stmt->closeResultSet(rset);<br />

Streamed Write<br />

The following code example demonstrates how to write data to an internal LOB (in<br />

this example, a BLOB) that is already populated by using a streamed write:<br />

ResultSet *rset=stmt->executeQuery("SELECT ad_composite FROM print_media<br />

WHERE product_id=6666 FOR UPDATE");<br />

while(rset->next())<br />

{<br />

Blob blob=rset->getBlob(1);<br />

if(blob.isNull())<br />

cerr commit();<br />

Improving Read and Write Performance<br />

Read and write performance of internal LOBs can be improved by using either of<br />

the following methods:<br />

■ getChunkSize() method<br />

■ writeChunk() method<br />

5-14 <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!