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 />

Statement Class<br />

A Statement object is used for executing SQL statements. The statement may be a<br />

query returning result set or a non-query statement returning an update count.<br />

Non-query SQL can be insert, update, or delete statements. Non-query SQL<br />

statements can also be DDL statements (such as create, grant, and so on) or stored<br />

procedure calls.<br />

A query, insert / update / delete, or stored procedure call statements may have IN<br />

bind parameters. A DML returning insert / update / delete statement or stored<br />

procedure call may have OUT bind parameters. Finally, a stored procedure call<br />

statement may have bind parameters that are both IN and OUT, referred to as<br />

IN/OUT parameters.<br />

The Statement class methods are divided into three categories:<br />

■ Statement methods applicable to all statements<br />

■ Methods applicable to prepared statements with IN bind parameters<br />

■ Methods applicable to callable statements and DML returning statements with<br />

OUT bind parameters.<br />

To..., use the syntax:<br />

Statement()<br />

enum Status<br />

{<br />

UNPREPARED,<br />

PREPARED,<br />

RESULT_SET_AVAILABLE,<br />

UPDATE_COUNT_AVAILABLE,<br />

NEEDS_STREAM_DATA,<br />

STREAM_DATA_AVAILABLE<br />

};<br />

Summary of Statement Methods<br />

Table 8–20 Statement Methods<br />

Method Description<br />

addIteration() on page 8-171 Add an iteration for execution.<br />

OCCI Classes and Methods 8-167

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

Saved successfully!

Ooh no, something went wrong!