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.

ResultSet Class<br />

ResultSet Class<br />

ResultSet()<br />

A ResultSet provides access to a table of data generated by executing a<br />

Statement. Table rows are retrieved in sequence. Within a row, column values can<br />

be accessed in any order.<br />

A ResultSet maintains a cursor pointing to its current row of data. Initially the<br />

cursor is positioned before the first row. The next method moves the cursor to the<br />

next row.<br />

The get ... () methods retrieve column values for the current row. You can retrieve<br />

values either using the index number of the column or the name of the column. In<br />

general, using the column index is more efficient. Columns are numbered beginning<br />

at 1.<br />

For the get ... () methods, OCCI attempts to convert the underlying data to the<br />

specified <strong>C++</strong> type and returns a <strong>C++</strong> value.<br />

SQL types are mapped to <strong>C++</strong> types with the ResultSet::get ... () methods.<br />

The number, types and properties of a ResultSet’s columns are provided by the<br />

MetaData object returned by the getColumnListMetaData method.<br />

enum Status<br />

{<br />

END_OF_FETCH = 0,<br />

DATA_AVAILABLE,<br />

STREAM_DATA_AVAILABLE<br />

};<br />

This is the ResultSet constructor.<br />

Syntax<br />

ResultSet()<br />

8-142 <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!