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.

conn->terminateStatement(stmt);<br />

// Terminate connection<br />

env->terminateConnection(conn);<br />

// Terminate environment<br />

Environment::terminateEnvironment(env);<br />

}<br />

/* Do the work.<br />

The environment is set up.<br />

A single new entry is created in the Address table.<br />

Then it is committed.<br />

*/<br />

void dowrite() {<br />

Carrying Forward User Added Code<br />

// Create an Address<br />

ADDRESS_O *addr1 = new(conn, "ADDR_TAB") ADDRESS_O("GE", "1211");<br />

Ref addr1_ref = (Ref) addr1->getRef();<br />

// Create joe black<br />

FullName *name1= new FullName("Joe", "Black");<br />

Person *person1 =<br />

new(conn, "PERSON_TAB") Person(1,name1,addr1_ref);<br />

Ref person1_ref = (Ref) person1->getRef();<br />

// Display, using reference<br />

cout

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

Saved successfully!

Ooh no, something went wrong!