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.

executeQuery()<br />

executeUpdate()<br />

getAutoCommit()<br />

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

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

Statement Class<br />

Execute a SQL statement that returns a ResultSet. Should not be called for a<br />

statement which is not a query, has streamed parameters. Returns a ResultSet<br />

that contains the data produced by the query<br />

Syntax<br />

ResultSet * executeQuery(const string &sql = "");<br />

Parameters<br />

sql<br />

sql statement to be executed. This can be null if setSQL() was used to associate the<br />

sql with the statement.<br />

Executes a non-query statement such as a SQL INSERT, UPDATE, DELETE<br />

statement, a DDL statement such as CREATE/ALTER and so on, or a stored<br />

procedure call. Returns either the row count for INSERT, UPDATE or DELETE or 0<br />

for SQL statements that return nothing<br />

Syntax<br />

unsigned int executeUpdate(const string &sql = "");<br />

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

Get the current auto-commit state. Returns Current state of auto-commit mode.<br />

Syntax<br />

bool getAutoCommit() const;<br />

OCCI Classes and Methods 8-175

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

Saved successfully!

Ooh no, something went wrong!