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

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Statement Class<br />

If UPDATE_COUNT_AVAILABLE is returned, the getUpdateCount method must be<br />

called to find out the update count.<br />

If NEEDS_STREAM_DATA is returned, output Streams must be written for the<br />

streamed IN bind parameters. If there is more than one streamed parameter, call the<br />

getCurrentStreamParam method to find out the bind parameter needing the<br />

stream. If the statement is executed iteratively, call getCurrentIteration to find<br />

out the iteration for which stream needs to be written.<br />

If STREAM_DATA_AVAILABLE is returned, input Streams must be read for the<br />

streamed OUT bind parameters. If there is more than one streamed parameter, call<br />

the getCurrentStreamParam method to find out the bind parameter needing the<br />

stream. If the statement is executed iteratively, call getCurrentIteration to find<br />

out the iteration for which stream needs to be read.<br />

If only one OUT value is returned for each invocation of the DML returning<br />

statement, iterative executes can be performed for DML returning statements. If<br />

output streams are used for OUT bind variables, they must be completely read in<br />

order. The getCurrentStreamParam method would indicate which stream needs<br />

to be read. Similarly, getCurrentIteration would indicate the iteration for<br />

which data is available.<br />

Returns<br />

■ RESULT_SET_AVAILABLE-- call getResultSet()<br />

■ UPDATE_COUNT_AVAILABLE -- call getUpdateCount()<br />

■ NEEDS_STREAM_DATA -- call getCurrentStream() and<br />

getCurrentIteration(), and write (or read) stream<br />

Syntax<br />

Status execute(const string &sql = "");<br />

Parameters<br />

executeArrayUpdate()<br />

sql<br />

The SQL statement to be executed. This can be null if the setSQL method was used<br />

to associate the sql with the statement.<br />

Executes insert/update/delete statements which use only the setDataBuffer() or<br />

stream interface for bind parameters. The bind parameters must be arrays of size<br />

OCCI Classes and Methods 8-173

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

Saved successfully!

Ooh no, something went wrong!