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.

OTT Utility Reference<br />

The schema name, or its absence, determines in which schema the type is found<br />

during program execution.<br />

There are three valid values for the SCHEMA_NAMES parameter:<br />

■ SCHEMA_NAMES=ALWAYS (default)<br />

All type names in the OUTTYPE file are qualified with a schema name.<br />

■ SCHEMA_NAMES=IF_NEEDED<br />

The type names in the OUTTYPE file that belong to the default schema are not<br />

qualified with a schema name. As always, type names belonging to other<br />

schemas are qualified with the schema name.<br />

■ SCHEMA_NAMES=FROM_INTYPE<br />

A type mentioned in the INTYPE file is qualified with a schema name in the<br />

OUTTYPE file if, and only if, it was qualified with a schema name in the INTYPE<br />

file. A type in the default schema that is not mentioned in the INTYPE file but<br />

that is generated because of type dependencies, is written with a schema name<br />

only if the first type encountered by the OTT utility that depends on it is also<br />

written with a schema name. However, a type that is not in the default schema<br />

to which the OTT utility is connected is always written with an explicit schema<br />

name.<br />

The OUTTYPE file generated by the OTT utility is the Pro*C/<strong>C++</strong> INTYPE file. This<br />

file matches database type names to C structure names. This information is used at<br />

runtime to make sure that the correct database type is selected into the structure. If<br />

a type appears with a schema name in the OUTTYPE file (Pro*C/<strong>C++</strong> INTYPE file),<br />

then the type is found in the named schema during program execution. If the type<br />

appears without a schema name, then the type is found in the default schema to<br />

which the program connects, which may be different from the default schema the<br />

OTT utility used.<br />

Example of SCHEMA_NAMES Parameter Usage<br />

Consider an example where the SCHEMA_NAMES parameter is set to FROM_INTYPE,<br />

and the INTYPE file contains the following:<br />

TYPE Person<br />

TYPE joe.Dept<br />

TYPE sam.Company<br />

7-132 <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!