- Page 1 and 2:
Oracle® C++ Call Interface Program
- Page 3 and 4:
List List of Figures Tables Content
- Page 5 and 6:
Null and Truncated Data............
- Page 7 and 8:
6 Metadata Overview of Metadata ...
- Page 9 and 10:
length() ..........................
- Page 11 and 12:
flushCache().......................
- Page 13 and 14:
getSecond() .......................
- Page 15 and 16:
cos()..............................
- Page 17 and 18:
operator new().....................
- Page 19 and 20:
isTruncated() .....................
- Page 21 and 22:
setCharacterStreamMode() ..........
- Page 23 and 24:
Index occiinh.typ .................
- Page 25 and 26:
List of Tables 2-1 Normal Data - No
- Page 27 and 28:
Oracle C++ Call Interface Programme
- Page 29 and 30:
Preface The Oracle C++ Call Interfa
- Page 31 and 32:
Related Documentation Chapter 4, "D
- Page 33 and 34:
Conventions in Text We use various
- Page 35 and 36:
Convention Meaning Example UPPERCAS
- Page 37 and 38:
What’s New in Orace C++ Call Inte
- Page 39:
■ Number Class ■ operator signe
- Page 43 and 44:
1 Introduction to OCCI This chapter
- Page 45 and 46:
Building an OCCI Application Overvi
- Page 47 and 48:
Processing of SQL Statements In an
- Page 49 and 50:
Overview of PL/SQL SELECT dname FRO
- Page 51 and 52:
Object Support Client-Side Object C
- Page 53 and 54:
Metadata Class Object Support ■ B
- Page 55 and 56:
2 Relational Programming This chapt
- Page 57 and 58:
. . . stmt->closeResultSet(rs); con
- Page 59 and 60:
const string poolUserName = "SCOTT"
- Page 61 and 62:
■ executeArrayUpdate: To execute
- Page 63 and 64:
Standard Statements Types of SQL St
- Page 65 and 66:
Types of SQL Statements in the OCCI
- Page 67 and 68:
Executing SQL Queries Executing SQL
- Page 69 and 70:
Specifying the Query } Executing SQ
- Page 71 and 72:
Status Definitions Executing Statem
- Page 73 and 74:
Executing Statements Dynamically No
- Page 75 and 76:
Null and Truncated Data Error Handl
- Page 77 and 78:
Advanced Relational Techniques In T
- Page 79 and 80:
Note: Advanced Relational Technique
- Page 81 and 82:
Optimizing Performance Advanced Rel
- Page 83 and 84:
Advanced Relational Techniques indi
- Page 85 and 86:
3 Object Programming This chapter p
- Page 87 and 88:
Persistent Objects Working with Obj
- Page 89 and 90:
Values In the context of this manua
- Page 91 and 92:
See Also: Developing an OCCI Object
- Page 93 and 94:
Figure 3-1 Basic Object Operational
- Page 95 and 96:
Developing an OCCI Object Applicati
- Page 97 and 98:
Overview of Associative Access Maxi
- Page 99 and 100:
Retrieving an Object Reference (REF
- Page 101 and 102:
} Overview of Navigational Access T
- Page 103 and 104:
Overview of Complex Object Retrieva
- Page 105 and 106:
■ The reference to the root purch
- Page 107 and 108:
} void *operator new(size_t size, c
- Page 109 and 110:
Freeing Objects Type Inheritance Ty
- Page 111 and 112:
Type Inheritance Instance substitut
- Page 113 and 114:
A Sample OCCI Application void *ope
- Page 115 and 116:
} cout
- Page 117 and 118:
} A Sample OCCI Application /* comm
- Page 119 and 120:
4 Datatypes This chapter is a refer
- Page 121 and 122:
Internal Datatypes Note: There are
- Page 123 and 124:
External Datatypes ■ OCCI_SQLT_CH
- Page 125 and 126:
Table 4-2 External Datatypes, C++ D
- Page 127 and 128:
External Datatypes CHARZ The extern
- Page 129 and 130:
External Datatypes FLOAT The extern
- Page 131 and 132:
External Datatypes LONG The externa
- Page 133 and 134:
OCCI BYTES OCCI CLOB OCCI DATE See
- Page 135 and 136:
External Datatypes When RAW data in
- Page 137 and 138:
External Datatypes is not an intege
- Page 139 and 140:
Table 4-5 Data Conversions Internal
- Page 141 and 142:
LONG RAW I/O LONG VARRAW I/O OCCI B
- Page 143 and 144:
The following topics are covered in
- Page 145 and 146:
External LOBs (BFILEs) Overview of
- Page 147 and 148:
Table 5-1 OCCI LOB Classes and Meth
- Page 149 and 150:
Creating LOBs Table 5-1 OCCI LOB Cl
- Page 151 and 152:
LOB Classes and Methods Note: For i
- Page 153 and 154:
{ Blob blob=rset->getBlob(1); if(bl
- Page 155 and 156:
} blob.writeChunk(, buffer, BUFSIZE
- Page 157 and 158:
Updating LOBs LOB Classes and Metho
- Page 159 and 160:
Objects with LOB Attributes 5. Repi
- Page 161 and 162:
6 Metadata This chapter describes h
- Page 163 and 164:
Describing Database Metadata You ob
- Page 165 and 166:
Metatdata Code Examples Table 6-1 A
- Page 167 and 168:
Describing Database Metadata /* Cal
- Page 169 and 170:
Attribute Reference . . /* Create a
- Page 171 and 172:
Table 6-2 Attributes Belonging to A
- Page 173 and 174:
Package Attributes Type Attributes
- Page 175 and 176:
Type Attribute Attributes Table 6-8
- Page 177 and 178:
Collection Attributes Table 6-10 At
- Page 179 and 180:
Synonym Attributes Sequence Attribu
- Page 181 and 182:
Table 6-14 Attributes Belonging to
- Page 183 and 184:
List Attributes Table 6-15 Attribut
- Page 185 and 186:
Table 6-18 Attributes Specific to D
- Page 187 and 188:
7 How to Use the Object Type Transl
- Page 189 and 190:
How to Use the OTT Utility the Type
- Page 191 and 192:
How to Use the OTT Utility Example
- Page 193 and 194:
}; virtual void writeSQL(oracle::oc
- Page 195 and 196:
} streamOCCI_.setString(name); stre
- Page 197 and 198:
Invoking the OTT Utility For global
- Page 199 and 200:
Invoking the OTT Utility userid Par
- Page 201 and 202:
Overview of the INTYPE File The lin
- Page 203 and 204:
OTT Utility Datatype Mappings The O
- Page 205 and 206:
OTT Utility Datatype Mappings Note:
- Page 207 and 208:
the_clob CLOB, the_object object_ty
- Page 209 and 210:
OTT Utility Datatype Mappings When
- Page 211 and 212:
class other_type : public oracle::o
- Page 213 and 214:
Overview of the OUTTYPE File its ve
- Page 215 and 216:
Figure 7-1 The OTT Utility with OCC
- Page 217 and 218:
The OTT Utility and OCCI Applicatio
- Page 219 and 220:
}; static void *readSQL(void *ctxOC
- Page 221 and 222:
public: }; void *operator new(size_
- Page 223 and 224:
{ FullName *objOCCI_ = (FullName *)
- Page 225 and 226:
excep.setErrorCtx(ctxOCCI_); } retu
- Page 227 and 228:
} setVector(streamOCCI_, PREV_ADDR_
- Page 229 and 230:
TYPE SCOTT.FULL_NAME AS FullName VE
- Page 231 and 232:
}; The OTT Utility and OCCI Applica
- Page 233 and 234:
***********************************
- Page 235 and 236:
#endif Map Registry Function The OT
- Page 237 and 238:
The OTT Utility and OCCI Applicatio
- Page 239 and 240:
public: }; void *operator new(size_
- Page 241 and 242:
}; static void *readSQL(void *ctxOC
- Page 243 and 244:
eturn; } void CFullName::writeSQL(o
- Page 245 and 246:
The OTT Utility and OCCI Applicatio
- Page 247 and 248:
eturn oracle::occi::PObject::operat
- Page 249 and 250:
Properties of OTT Markers Following
- Page 251 and 252:
Where the Markers Can Be Used Carry
- Page 253 and 254:
Carrying Forward User Added Code be
- Page 255 and 256:
DROP TABLE PERSON_TAB; DROP TABLE A
- Page 257 and 258:
Carrying Forward User Added Code AD
- Page 259 and 260:
}; PERSON_O(); Carrying Forward Use
- Page 261 and 262:
addr = new_addr; this->markModified
- Page 263 and 264:
} return; } void ADDRESS_O::writeSQ
- Page 265 and 266:
} streamOCCI_.setString(last_name);
- Page 267 and 268:
mdemo1m.cpp // --------------------
- Page 269 and 270:
conn->terminateStatement(stmt); //
- Page 271 and 272:
Example OCCI Application Example OC
- Page 273 and 274: ■ Example of C++ Source File for
- Page 275 and 276: OCCI_STD_NAMESPACE::string STATE; O
- Page 277 and 278: }; void *operator new(size_t size);
- Page 279 and 280: OCCI_STD_NAMESPACE::string CFullNam
- Page 281 and 282: } streamOCCI_.setString(FirstName);
- Page 283 and 284: { if (objOCCI_->isNull()) streamOCC
- Page 285 and 286: OCCI_STD_NAMESPACE::string CPerson:
- Page 287 and 288: { return oracle::occi::PObject::ope
- Page 289 and 290: #ifndef CPERSON_ORACLE # include "c
- Page 291 and 292: Example OCCI Application /*********
- Page 293 and 294: * initialize MyFullName */ MyFullNa
- Page 295 and 296: * Display all the information of My
- Page 297 and 298: Example OCCI Application conn, and
- Page 299 and 300: } RefAny jillrefany = resultSet2->g
- Page 301 and 302: Connection *conn = env->createConne
- Page 303 and 304: OTT Command Line Syntax OTT Utility
- Page 305 and 306: ■ CPPFILE Parameter ■ ERRTYPE P
- Page 307 and 308: OTT Utility Reference CONFIG Parame
- Page 309 and 310: INITFUNC=filename OTT Utility Refer
- Page 311 and 312: See Also: "SCHEMA_NAMES Usage" on p
- Page 313 and 314: Structure of the INTYPE File OTT Ut
- Page 315 and 316: ■ It appears in the INTYPE file.
- Page 317 and 318: struct px1_ind col1 }; typedef stru
- Page 319 and 320: OTT Utility Reference The Pro*C/C++
- Page 321 and 322: OTT Utility Reference Once the OTT
- Page 323: This part contains one chapter: ■
- Page 327 and 328: Table 8-1 OCCI Classes (Cont.) Clas
- Page 329 and 330: Bfile Class Bfile Class The Bfile c
- Page 331 and 332: fileExists() getDirAlias() getFileN
- Page 333 and 334: length() open() operator=() operato
- Page 335 and 336: setName() setNull() buffer The buff
- Page 337 and 338: append() Table 8-3 Blob Methods (Co
- Page 339 and 340: getChunkSize() Parameters srcBfile
- Page 341 and 342: isOpen() length() open() operator=(
- Page 343 and 344: setEmpty() setEmpty() Syntax unsign
- Page 345 and 346: writeChunk() unsigned int bufsize,
- Page 347 and 348: Bytes Class Bytes Class Methods of
- Page 349 and 350: length() setNull() This method retu
- Page 351 and 352: Table 8-5 Clob Methods (Cont.) Meth
- Page 353 and 354: getCharSetForm() unsigned int dstOf
- Page 355 and 356: isInitialized() isNull() isOpen() l
- Page 357 and 358: operator!=() read() Parameters srcC
- Page 359 and 360: setEmpty() setEmpty() setNull() tri
- Page 361 and 362: writeChunk() Clob Class This method
- Page 363 and 364: changePassword() commit() This meth
- Page 365 and 366: getOCIServer() Connection Class prm
- Page 367 and 368: ConnectionPool Class ConnectionPool
- Page 369 and 370: Parameters getBusyConnections() get
- Page 371 and 372: setPoolSize() setTimeOut() Connecti
- Page 373 and 374: Date Class Date Class The Date clas
- Page 375 and 376:
Table 8-8 Date Methods (Cont.) Meth
- Page 377 and 378:
fromBytes() fromText() This method
- Page 379 and 380:
isNull() lastDay() nextDay() operat
- Page 381 and 382:
operator>=() operator(const Date &a
- Page 383 and 384:
setNull() toBytes() toText() day Th
- Page 385 and 386:
Parameters zone1 A string represent
- Page 387 and 388:
createConnection() This method esta
- Page 389 and 390:
Environment Class method. If no mem
- Page 391 and 392:
setCacheMaxSize() setCacheOptSize()
- Page 393 and 394:
IntervalDS Class IntervalDS Class L
- Page 395 and 396:
Summary of IntervalDS Methods Table
- Page 397 and 398:
getHour() getMinute() getSecond() i
- Page 399 and 400:
operator!=() operator/() const Inte
- Page 401 and 402:
operator
- Page 403 and 404:
set() setNull() Parameters a A day
- Page 405 and 406:
IntervalYM Class IntervalYM Class I
- Page 407 and 408:
fromText() Table 8-11 IntervalYM Me
- Page 409 and 410:
operator*=() operator=() operator==
- Page 411 and 412:
operator/=() operator>() operator>=
- Page 413 and 414:
operator-=() operator+() operator+=
- Page 415 and 416:
nlsParam This parameter is not curr
- Page 417 and 418:
Syntax Map Class registration can b
- Page 419 and 420:
■ TYPEENCAP_PRIVATE ■ TYPEENCAP
- Page 421 and 422:
getAttributeType() getBoolean() get
- Page 423 and 424:
getString() getTimeStamp() getUInt(
- Page 425 and 426:
Number Class Number Class The Numbe
- Page 427 and 428:
* Create a statement and associate
- Page 429 and 430:
Table 8-14 Number Methods (Cont.) M
- Page 431 and 432:
abs() arcCos() arcSin() arcTan() Ta
- Page 433 and 434:
floor() fromBytes() fromText() Numb
- Page 435 and 436:
isNull() ln() log() operator++() Pa
- Page 437 and 438:
operator/() operator%() operator+()
- Page 439 and 440:
operator() Parameters a, b Numbers
- Page 441 and 442:
operator=() operator*=() operator/=
- Page 443 and 444:
operator char() Parameters operator
- Page 445 and 446:
operator unsigned long() operator u
- Page 447 and 448:
sign() sin() sqareroot() tan() toBy
- Page 449 and 450:
Parameters Number Class decplace Th
- Page 451 and 452:
flush() getConnection() getRef() Ta
- Page 453 and 454:
markDelete() markModified() operato
- Page 455 and 456:
setNull() unmark() unpin() This met
- Page 457 and 458:
clear() getConnection() getRef() Ta
- Page 459 and 460:
operator*() operator==() operator!=
- Page 461 and 462:
setPrefetch() setLock() Ref Class S
- Page 463 and 464:
RefAny Class RefAny Class The RefAn
- Page 465 and 466:
operator==() operator!=() unmarkDel
- Page 467 and 468:
Summary of ResultSet Methods Table
- Page 469 and 470:
cancel() closeStream() Table 8-18 R
- Page 471 and 472:
getCharSet() getClob() Parameters c
- Page 473 and 474:
getDate() Parameters colIndex The f
- Page 475 and 476:
getIntervalYM() Parameters colIndex
- Page 477 and 478:
getRowid() getRowPosition() getStat
- Page 479 and 480:
getVector() ResultSet Class This me
- Page 481 and 482:
getVectorOfRefs() ResultSet Class I
- Page 483 and 484:
next() ResultSet Class A ResultSet
- Page 485 and 486:
setCharSet() ResultSet Class Overri
- Page 487 and 488:
setErrorOnNull() ind Pointer to an
- Page 489 and 490:
SQLException Class SQLException() S
- Page 491 and 492:
Statement Class Statement Class A S
- Page 493 and 494:
Table 8-20 Statement Methods (Cont.
- Page 495 and 496:
addIteration() closeResultSet() Tab
- Page 497 and 498:
Statement Class If UPDATE_COUNT_AVA
- Page 499 and 500:
executeQuery() executeUpdate() getA
- Page 501 and 502:
getCharSet() getClob() getConnectio
- Page 503 and 504:
getDatabaseNCHARParam() getDate() g
- Page 505 and 506:
getIntervalYM() getMaxIterations()
- Page 507 and 508:
getResultSet() getRowid() getSQL()
- Page 509 and 510:
getUpdateCount() getVector() Parame
- Page 511 and 512:
getVectorOfRefs() unsigned int para
- Page 513 and 514:
Parameters preTruncationLength() pa
- Page 515 and 516:
Parameters paramIndex The first par
- Page 517 and 518:
setCharSet() setClob() setDate() St
- Page 519 and 520:
Statement Class Note that not all t
- Page 521 and 522:
ub4 *arrayLength, sb4 elementSize,
- Page 523 and 524:
setFloat() setInt() Syntax void set
- Page 525 and 526:
Statement Class larger the iteratio
- Page 527 and 528:
Parameters setPrefetchMemorySize()
- Page 529 and 530:
setString() setTimestamp() Syntax v
- Page 531 and 532:
void setVector(Statement *stmt, uns
- Page 533 and 534:
setVectorOfRefs() Parameters stmt s
- Page 535 and 536:
Stream Class You use a Stream to re
- Page 537 and 538:
writeLastBuffer() status() Paramete
- Page 539 and 540:
Timestamp Class The following code
- Page 541 and 542:
fromText() Table 8-22 Timestamp Met
- Page 543 and 544:
getTimeZoneOffset() intervalAdd() s
- Page 545 and 546:
operator==() operator!=() operator>
- Page 547 and 548:
operator
- Page 549 and 550:
subDS() subYM() Syntax void setTime
- Page 551:
This part contains one appendix:
- Page 554 and 555:
OCCI Demonstration Programs OCCI De
- Page 556 and 557:
OCCI Demonstration Programs # make
- Page 558 and 559:
OCCI Demonstration Programs A-6 Ora
- Page 560 and 561:
OCCI Demonstration Programs buildcp
- Page 562 and 563:
OCCI Demonstration Programs string
- Page 564 and 565:
OCCI Demonstration Programs passwor
- Page 566 and 567:
OCCI Demonstration Programs * The d
- Page 568 and 569:
OCCI Demonstration Programs } * def
- Page 570 and 571:
OCCI Demonstration Programs occicol
- Page 572 and 573:
OCCI Demonstration Programs } "INSE
- Page 574 and 575:
OCCI Demonstration Programs try{ if
- Page 576 and 577:
OCCI Demonstration Programs conn =
- Page 578 and 579:
OCCI Demonstration Programs cout
- Page 580 and 581:
OCCI Demonstration Programs { MetaD
- Page 582 and 583:
OCCI Demonstration Programs md.getI
- Page 584 and 585:
OCCI Demonstration Programs occidml
- Page 586 and 587:
OCCI Demonstration Programs "UPDATE
- Page 588 and 589:
OCCI Demonstration Programs occiinh
- Page 590 and 591:
OCCI Demonstration Programs occiinh
- Page 592 and 593:
OCCI Demonstration Programs stmt->s
- Page 594 and 595:
OCCI Demonstration Programs occiobj
- Page 596 and 597:
OCCI Demonstration Programs */ void
- Page 598 and 599:
OCCI Demonstration Programs try{ st
- Page 600 and 601:
OCCI Demonstration Programs class a
- Page 602 and 603:
OCCI Demonstration Programs /** * d
- Page 604 and 605:
OCCI Demonstration Programs occipoo
- Page 606 and 607:
OCCI Demonstration Programs occipro
- Page 608 and 609:
OCCI Demonstration Programs string
- Page 610 and 611:
OCCI Demonstration Programs { env->
- Page 612 and 613:
OCCI Demonstration Programs A-60 Or
- Page 614 and 615:
complex object retrieval complex ob
- Page 616 and 617:
opening, 5-8 overview, 5-2 reading,
- Page 618 and 619:
connection pool, 2-3 creating, 2-2
- Page 620:
external datatype, 4-19 VARNUM exte