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.

Data Conversions<br />

Data Conversions<br />

VARRAW<br />

The external datatype VARRAW is similar to the external datatype RAW, except that<br />

the first two bytes contain the length of the data. The specified length of the string<br />

in a bind or a define call must include the two length bytes. So the largest VARRAW<br />

string that can be received or sent is 65533 bytes, not 65535. For converting longer<br />

strings, use the LONG VARRAW datatype.<br />

Table 4–5 lists the supported conversions from <strong>Oracle</strong> internal datatypes to external<br />

datatypes, and from external datatypes to internal column representations. Note the<br />

following conditions:<br />

■ A REF stored in the database is converted to OCCI_SQLT_REF on output<br />

■ OCCI_SQLT_REF is converted to the internal representation of a REF on input<br />

■ A named datatype stored in the database is converted to OCCI_SQLT_NTY (and<br />

represented by a C structure in the application) on output<br />

■ OCCI_SQLT_NTY (represented by a C structure in an application) is converted<br />

to the internal representation of the corresponding datatype on input<br />

■ A LOB and a BFILE are represented by descriptors in OCCI applications, so<br />

there are no input or output conversions<br />

4-20 <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!