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.

Describing Database Metadata<br />

/* <strong>Call</strong> getVector to obtain a list of columns in the CUSTOMERS table */<br />

vectorlistOfColumns;<br />

listOfColumns=custtab_metaData.getVector(MetaData::ATTR_LIST_COLUMNS);<br />

/* Assuming that the metadata for the column cust_address_typ<br />

is the fourth element in the list...<br />

*/<br />

MetaData customer_address=listOfColumns[3];<br />

/* Now you can obtain the metadata for the customer_address attribute */<br />

int typcode = customer_address.getInt(MetaData::ATTR_TYPECODE);<br />

if(typcode==OCCI_TYPECODE_OBJECT)<br />

cout

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

Saved successfully!

Ooh no, something went wrong!