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

IntervalYM Class<br />

IntervalYM supports the SQL92 datatype Year-Month Interval.<br />

Leading field precision will be determined by number of decimal digits on input.<br />

IntervalYM(const Environment *env,<br />

int year = 0,<br />

int month=0);<br />

year<br />

Valid values are -10^9 through 10^9<br />

month<br />

Valid values are -11 through 11<br />

Constructs a null IntervalYM object. A null intervalYM can be initialized by<br />

assignment or calling fromText method. Methods that can be called on null<br />

intervalYM objects are setNull and isNull.<br />

IntervalYM();<br />

Constructs an IntervalYM object from src.<br />

IntervalYM(const IntervalYM &src);<br />

The following code example demonstrates that the default constructor creates a null<br />

value, and how you can assign a non null value to a year-month interval and then<br />

perform operations on it:<br />

Environment *env = Environment::createEnvironment();<br />

//create a null year-month interval<br />

IntervalYM ym<br />

if(ym.isnull())<br />

cout

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

Saved successfully!

Ooh no, something went wrong!