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.

}<br />

streamOCCI_.setString(name);<br />

streamOCCI_.setNumber(empno);<br />

streamOCCI_.setNumber(deptno);<br />

streamOCCI_.setDate(hiredate);<br />

streamOCCI_.setNumber(salary);<br />

Contents of the RegisterMappings.h File<br />

#ifndef REGISTERMAPPINGS_ORACLE<br />

# define REGISTERMAPPINGS_ORACLE<br />

#ifndef OCCI_ORACLE<br />

# include <br />

#endif<br />

#ifndef DEMO_ORACLE<br />

# include "demo.h"<br />

#endif<br />

void RegisterMappings(oracle::occi::Environment* envOCCI_);<br />

#endif<br />

Contents of the RegisterMappings.cpp File<br />

#ifndef REGISTERMAPPINGS_ORACLE<br />

# include "registermappings.h"<br />

#endif<br />

How to Use the OTT Utility<br />

void RegisterMappings(oracle::occi::Environment* envOCCI_)<br />

{<br />

oracle::occi::Map *mapOCCI_ = envOCCI_->getMap();<br />

mapOCCI_->put("SCOTT.EMPLOYEE", employee::readSQL, employee::writeSQL);<br />

}<br />

Contents of the demoout.typ File<br />

CASE = LOWER<br />

MAPFILE = RegisterMappings.cpp<br />

MAPFUNC = RegisterMappings<br />

How to Use the Object Type Translator Utility 7-9

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

Saved successfully!

Ooh no, something went wrong!