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.

IntervalYM Class<br />

The following code example demonstrates how to get the year-month interval<br />

column from a result set, add to the year-month interval by using the += operator,<br />

multiply by using the * operator, compare 2 year-month intervals, and convert a<br />

year-month interval to a string by using the toText method:<br />

//SELECT WARRANT_PERIOD from PRODUCT_INFORMATION<br />

//obtain result set<br />

resultset->next();<br />

//get interval value from resultset<br />

IntervalYM ym1 = resultset->getIntervalYM(1);<br />

IntervalYM addWith(env, 10, 1);<br />

ym1 += addWith; //call += operator<br />

IntervalYM mulYm1 = ym1 * Number(env, 10); //call * operator<br />

if(ym1

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

Saved successfully!

Ooh no, something went wrong!