Programmer's Guide to the Oracle Call Interface
Release 8.0

A54656_01

Library

Product

Contents

Prev Index


A

aborting OCI calls, 2-30
abstract data type
representing in C applications, 8-8
ADO. See attribute descriptor object, 9-25
allocation duration
example, 11-15
of objects, 11-14
application failover
callback example, 7-32
callback registration, 7-32
OCI callbacks, 7-30
applications
linking, 2-31
arguments
attributes, 6-14
array binds, 10-3
array defines, 10-6
arrays
skip parameter for, 5-20
arrays of structures, 5-18
indicator variables, 5-21
OCI calls used, 5-21
skip parameters, 5-19
atomic nullness, 8-26
attribute descriptor object, 9-25
attributes
of handles, 2-10
of parameter descriptors, 6-5
of parameters, 6-5
authentication
of user, 7-11

B

BFILE
datatype, 3-20
BFILE datatype, 3-20
bind handle
attributes, B-24
description, 2-9
bind operation, 4-5, 5-2, 10-2
associations made, 5-3
example, 5-6
LOBs, 5-11
named data types, 5-10, 10-2
named vs. positional, 5-4
OCI array interface, 5-5
OCI_DATA_AT_EXEC mode, 5-12
PL/SQL, 5-5
positional vs. named, 5-4
ref cursor variables, 5-12
REFs, 5-10, 10-3
static arrays, 5-10
steps used, 5-6
binding
arrays, 10-3
OCINumber, 10-7
PL/SQL placeholders, 2-32
summary, 5-13
BLOB
datatype, 3-20
BLOB datatype, 3-20
branches
detaching, 7-7
resuming, 7-7
buffering LOB operations, 7-27

C

C datatypes
manipulating with OCI, 9-5
cache functions
server roundtrips, E-4
callback registration
application failover, 7-32
callbacks
application failover, 7-30
for LOB operations, 7-29
from external procedures, 7-29
parameter modes, 13-30
canceling OCI calls, 2-30
CASE OTT parameter, 12-27
CHAR
external datatype, 3-15
character set form, 5-26
character set ID, 5-26
CHARZ
external datatype, 3-17
CLOB
datatype, 3-21
CLOB datatype, 3-21
CODE OTT parameter, 12-25
coherency
of object cache, 11-5
collections
attributes, 6-11
describing, 6-2
columns
attributes, 6-13
commit, 2-23
in object applications, 11-14
one-phase for global transactions, 7-8
two-pahse for global transactions, 7-8
complex object retrieval, 8-18
implementing, 8-21
navigational prefetching, 8-22
complex object retrieval (COR) descriptor, 2-14
attributes, B-29
complex object retrieval (COR) handle, 2-10
attributes, B-29
CONFIG OTT parameter, 12-27
configuration files
and the OTT, 12-5
connections
establishing, 2-18, 2-19
managing multiple, 2-21
consistency
of object cache, 11-5
copying objects, 8-29
COR, see complex object retrieval, 8-18
creating objects, 8-29

D

data definition language
SQL statements, 1-4
data manipulation language
SQL statements, 1-5
data structures
new for 8.0, 2-5
database connection
for object applications, 8-10
datatype
conversions, 3-22
external, 3-4, 3-7
internal, 3-4, 3-5
Oracle, 3-2
datatype code
internal, 3-5
datatype mapping
Oracle methodology, 9-5
datatype mapping and manipulation functions
server roundtrips, E-6
datatype mappings, 12-10
datatypes
BFILE, 3-20
BLOB, 3-20
CLOB, 3-21
FILE, 3-20
for piecewise operations, 7-18
manipulating with OCI, 9-5
mapping from Oracle to C, 9-3
NCLOB, 3-21
DATE
external datatype, 3-13
DDL. See data definition language, 1-4
default file name extensions, 12-36
default name mapping, 12-36
define
arrays, 10-6
define handle
attributes, B-26
description, 2-9
define operation, 4-12, 5-14, 10-4
example, 5-15
LOBs, 5-17
named data types, 5-17, 10-4
piecewise fetch, 5-18
PL/SQL output variables, 5-17
REFs, 5-17, 10-4
static arrays, 5-18
steps used, 5-15
defining
OCINumber, 10-7
deletes
positioned, 2-31
describe
object describe code example, D-47
of collections, 6-2
of packages, 6-2
of sequences, 6-2
of stored functions, 6-2
of stored procedures, 6-2
of synonyms, 6-2
of tables, 6-2
of types, 6-2
of views, 6-2
describe handle
attributes, B-27
description, 2-10
describe operation, 4-8
implicit, 4-9
server roundtrips, E-5
descriptor, 2-12
complex object retrieval, 2-14
parameter, 2-14
ROWID, 2-14
snapshot, 2-12
descriptor objects, 9-25
descriptors
allocating, 2-17
detaching branches, 7-7
DML with RETURNING clause
See RETURNING clause, 5-22
DML. See data manipulation language, 1-5
duration
of objects, 11-14
durations
example, 11-15

E

embedded objects
fetching, 8-15
embedded SQL, 1-8
mixing with OCI calls, 1-8
environment handle
attributes, B-13
description, 2-8
error codes
navigational functions, 14-5
error handle
description, 2-8
error handling
example, 2-26
errors
handling, 2-25
handling in object applications, 8-29
ERRTYPE OTT parameter, 12-27
executing SQL statements, 4-6
execution
against multiple servers, 4-5
modes, 4-8
execution snapshots, 4-7
extensions
default file name, 12-36
external datatype, 3-4
CHAR, 3-15
CHARZ, 3-17
DATE, 3-13
FLOAT, 3-11
INTEGER, 3-11
LOBs, 3-19
LONG, 3-12
LONG RAW, 3-15
LONG VARCHAR, 3-15
LONG VARRAW, 3-15
MLSLABEL, 3-17
named data types, 3-18
NUMBER, 3-10
RAW, 3-14
REF, 3-18
ROWID, 3-13
SQLT_BLOB, 3-19
SQLT_CLOB
external datatype
SQLT_NCLOB, 3-19
SQLT_NTY, 3-18
SQLT_REF, 3-18
STRING, 3-11
UNSIGNED, 3-15
VARCHAR, 3-13
VARCHAR2, 3-8
VARNUM, 3-12
VARRAW, 3-15
external datatypes, 3-7
conversions, 3-22
external procedure functions
return codes, 16-2
with_context type, 16-2
external procedures
OCI callbacks, 7-29

F

fetch
piecewise, 7-16, 7-21
fetch operation, 4-12
LOB data, 4-13
setting prefetch count, 4-13
FILE
associating with OS file, 7-26
datatype, 3-20
locator, 7-25
FLOAT
external datatype, 3-11
flushing, 11-11
object changes, 8-14
flushing objects, 11-11
freeing objects, 8-29, 11-9
functions
attributes, 6-7

G

global transactions, 7-4
GTRID. See transaction identifer, 7-5

H

handle attributes, 2-10
reading, 2-10
setting, 2-10
handles, 2-5
advantages of, 2-7
allocating, 2-6, 2-17
bind handle, 2-9
C datatypes, 2-5
child freed when parent freed, 2-7
define handle, 2-9
describe handle, 2-10
environment handle, 2-8
error handle, 2-8
freeing, 2-6
hierarchy of, 2-7
server handle, 2-8
service context handle, 2-8
statement handle, 2-9
transaction handle, 2-9
types, 2-5
user session handle, 2-8
HFILE OTT parameter, 12-26

I

indicator variable, 2-29
arrays of structures, 5-21
for named data types, 2-28
for REF, 2-28
named data type defines, 10-5
PL/SQL OUT binds, 10-5
REF defines, 10-5
with named data type bind, 10-3
with REF bind, 10-3
indicator variables
for named data types, 2-30
for REFs, 2-30
INITFILE OTT parameter, 12-26
INITFUNC OTT parameter, 12-26
initialization function
calling, 12-19
tasks of, 12-21
insert
piecewise, 7-16, 7-18
INTEGER
external datatype, 3-11
internal datatype, 3-4, 3-5
datatype codes, 3-5
internal datatypes
conversions, 3-22
intype file, 12-29
providing when running OTT, 12-8
structure of, 12-29
INTYPE OTT parameter, 12-24

K

keywords, C-2

L

linking, 2-31
issues, A-7
modes, A-7
support for single-task, A-10
lists
attributes, 6-16
LOB, 7-24
binding, 5-11
creating, 7-25
defining, 5-17
external data type, 3-19
fetching data, 4-13
locator, 2-13
modifying, 7-25
OCI functions, 7-27
OCI operations on, 7-24
LOB attributes
of transient objects, 7-26
LOB buffering, 7-27
code example, D-82
LOB functions
server roundtrips, E-2
LOB locator, 2-13, 7-24
attributes, B-28
LOB operations
buffering, 7-27
callbacks, 7-29
code example, D-64
locator, 2-12
for LOB datatype, 2-13, 7-24
locking, 11-13
locking objects, 11-13
LONG
external datatype, 3-12
LONG RAW
external datatype, 3-15
LONG VARCHAR
external datatype, 3-15
LONG VARRAW
external datatype, 3-15

M

marking objects, 11-10
MDO. See method descriptor object, 9-25
meta-attributes
of objects, 8-17
of persistent objects, 8-17
of transient objects, 8-18
method descriptor object, 9-25
migration
7.x to 8.0, A-5
MLSLABEL
external datatype, 3-17
multiple servers
executing statement against, 4-5
multi-threaded development
basic concepts, 7-14

N

named data type
binding and defining, 10-6
indicator variable for, 2-28
named data types
binding, 5-10, 10-2
defining, 5-17, 10-4
definition, 3-18
external data types, 3-18
indicator variables, 2-30
namespaces
reserved, C-11
navigation, 11-17
navigational functions
error codes, 14-5
return values, 14-4
terminology, 14-4
NCHAR
issues, 5-26
NCLOB
datatype, 3-21
NCLOB datatype, 3-21
nested table
element ordering, 9-22
new features, F-2
benefits, F-8
enhancements, F-2
introduction, F-2
null indicator struct
generated by OTT, 8-9
null undicator struct, 8-26
nullness
atomic, 8-26
of objects, 8-26
NULLs
detecting, 2-29
inserting, 2-29
inserting into database, 2-28
inserting using indicator variables, 2-28
NUMBER
external datatype, 3-10

O

object
allocation duration, 11-14
array pin, 8-13
attributes
manipulating, 8-13
duration, 11-14
memory layout of instance, 11-16
nullness, 8-26
pin count, 8-25
pin duration, 11-14
pinning, 8-12
secondary memory, 11-16
top-level memory, 11-16
unpinning, 8-25
object application
database connection, 8-10
object applications
commit, 11-14
rollback, 11-14
object cache, 11-3
coherency, 11-5
consistency, 11-5
initializing, 8-10
loading objects, 11-7
memory parameters, 11-5
operations on, 11-6
removing objects, 11-7
setting the size of, 11-5
object functions
See navigational functions, 14-6
server roundtrips, E-4
object identifier
for persistent objects, 8-6
object reference, 8-29
object reference. See REF, 8-11
object retrieval
code example, D-10
object runtime environment
initializing, 8-10
object type translator
sample output, 8-9
See OTT, 12-2
use with OCI, 8-8
objects
accessing with OCI, 12-19
client-side cache, 11-3
copying, 8-29
creating, 8-29
flushing, 11-11
flushing changes, 8-14
freeing, 8-29, 11-9
lifetime, 14-2
LOB attributes of transient objects, 7-26
locking, 11-13
manipulating with OCI, 12-19
marking, 8-14, 11-10
memory management, 11-3
meta-attributes, 8-17
navigation, 11-17
simple, 11-17
OCI object application structure, 8-4
persistent, 8-6
pinning, 11-7
refreshing, 11-11
terminology, 8-6, 14-2
transient, 8-6-8-7
types, 8-6, 14-2
unmarking, 11-10
unpinning, 11-9
use with OCI, 8-3
obsolescent OCI functions, A-2
obsolete OCI functions , A-4
OCI
object support, 1-9
overview, 1-2
parts of, 1-10
release 8.0 new features, 1-10
OCI application
compiling, 1-11
general structure, 2-3
initialization example, 2-19
linking, 1-11
steps, 2-16
structure, 2-3
structure using objects, 8-4
terminating, 2-23
with objects
initializing, 8-10
OCI applications
using the OTT with, 12-17
OCI environment
initializing for objects, 8-10
OCI functions
canceling calls, 2-30
obsolescent, A-2
obsolete , A-4
return codes, 2-25, 2-27
OCI navigational functions, 11-19
flush functions, 11-20
mark functions, 11-20
meta-attribute accessor functions, 11-21
miscellaneous functions, 11-21
naming scheme, 11-19
pin/unpin/free functions, 11-19
OCI process
initializing, 2-17
initializing for objects, 8-10
modes, 2-17
OCI program. See OCI application, 2-3
OCI relational functions
guide to reference entries, 13-7, 16-3
quick reference, 13-3
OCI Release 8
accessing and manipulating objects, 12-19
OCI_ATTR_ALLOC_DURATION
environment handle attribute, B-15
OCI_ATTR_CACHE
attribute, 6-12
OCI_ATTR_CACHE_MAX_SIZE
environment handle attribute, B-13
OCI_ATTR_CACHE_OPT_SIZE
environment handle attribute, B-13
OCI_ATTR_CHAR_COUNT
bind handle attribute, B-24
define handle attribute, B-26
use of, 5-28
OCI_ATTR_CHARSET_FORM
attribute, 6-9, 6-11, 6-13
bind handle attribute, B-24
define handle attribute, B-26
OCI_ATTR_CHARSET_ID
attribute, 6-9, 6-11, 6-13, 6-15
bind handle attribute, B-24
define handle attribute, B-26
OCI_ATTR_CLUSTERED
attribute, 6-6
OCI_ATTR_COLLECTION_ELEMENT
attribute, 6-8
OCI_ATTR_COLLECTION_TYPECODE
attribute, 6-8
OCI_ATTR_COMPLEXOBJECT_COLL
_OUTOFLINE
COR handle attribute, B-29
OCI_ATTR_COMPLEXOBJECT_LEVEL
COR handle attribute, B-29
OCI_ATTR_COMPLEXOBJECTCOMP
_TYPE
COR descriptor attribute, B-29
OCI_ATTR_COMPLEXOBJECTCOMP
_TYPE_LEVEL
COR descriptor attribute, B-29
OCI_ATTR_DATA_SIZE
attribute, 6-9, 6-11, 6-13-6-14
OCI_ATTR_DATA_TYPE
attribute, 6-9, 6-11, 6-13-6-14
OCI_ATTR_DBA
attribute, 6-6
OCI_ATTR_ENCAPSULATION
attribute, 6-10
OCI_ATTR_ENV
server handle attribute, B-18
service context handle attribute, B-17
OCI_ATTR_EXTERNAL_NAME
server handle attribute, B-19
OCI_ATTR_FNCODE
bind handle attribute, B-24
define handle attribute, B-26
environment handle attribute, B-13
server handle attribute, B-18
statement handle attribute, B-21
OCI_ATTR_FOCBK
server handle attribute, B-19
OCI_ATTR_HAS_DEFAULT
attribute, 6-14
OCI_ATTR_HAS_FILE
attribute, 6-8
OCI_ATTR_HAS_LOB
attribute, 6-8
OCI_ATTR_HAS_NESTED_TABLE
attribute, 6-8
OCI_ATTR_HW_MARK
attribute, 6-12
OCI_ATTR_IN_V8_MODE
server handle attribute, B-19
service context handle attribute, B-18
OCI_ATTR_INCR
attribute, 6-12
OCI_ATTR_INDEX_ONLY
attribute, 6-6
OCI_ATTR_INTERNAL_NAME
server handle attribute, B-19
OCI_ATTR_IOMODE
attribute, 6-14
OCI_ATTR_IS_CONSTRUCTOR
attribute, 6-10
OCI_ATTR_IS_DESTRUCTOR
attribute, 6-10
OCI_ATTR_IS_INCOMPLETE_TYPE
attribute, 6-8
OCI_ATTR_IS_MAP
attribute, 6-10
OCI_ATTR_IS_NULL
attribute, 6-13-6-14
OCI_ATTR_IS_OPERATOR
attribute, 6-10
OCI_ATTR_IS_ORDER
attribute, 6-10
OCI_ATTR_IS_PREDEFINED_TYPE
attribute, 6-8
OCI_ATTR_IS_RNDS
attribute, 6-10
OCI_ATTR_IS_RNPS
attribute, 6-10
OCI_ATTR_IS_SELFISH
attribute, 6-10
OCI_ATTR_IS_SYSTEM_GENERATED_TYPE
attribute, 6-8
OCI_ATTR_IS_SYSTEM_TYPE
attribute, 6-8
OCI_ATTR_IS_TRANSIENT_TYPE
attribute, 6-8
OCI_ATTR_IS_WNDS
attribute, 6-10
OCI_ATTR_IS_WNPS
attribute, 6-10
OCI_ATTR_LEVEL
attribute, 6-14
OCI_ATTR_LINK
attribute, 6-12, 6-15
OCI_ATTR_LIST_ARGUMENTS
attribute, 6-7, 6-10
OCI_ATTR_LIST_COLUMNS
attribute, 6-6
OCI_ATTR_LIST_SUBPROGRAMS
attribute, 6-7
OCI_ATTR_LIST_TYPE
attribute, 6-16
OCI_ATTR_LIST_TYPE_ATTRS
attribute, 6-8
OCI_ATTR_LIST_TYPE_METHODS
attribute, 6-8
OCI_ATTR_LOBEMPTY
LOB locator attribute, B-28
OCI_ATTR_MAP_METHOD
attribute, 6-8
OCI_ATTR_MAX
attribute, 6-12
OCI_ATTR_MAXDATA_SIZE
bind handle attribute, B-24
use with binding, 5-27
OCI_ATTR_MIN
attribute, 6-12
OCI_ATTR_NAME
attribute, 6-7, 6-9-6-14
OCI_ATTR_NUM_ATTRS
attribute, 6-5
OCI_ATTR_NUM_COLS
attribute, 6-6
OCI_ATTR_NUM_ELEMENTS
attribute, 6-11
OCI_ATTR_NUM_HANDLES
attribute, 6-16
OCI_ATTR_NUM_PARAMS
attribute, 6-5
OCI_ATTR_NUM_TYPE_ATTRS
attribute, 6-8
OCI_ATTR_NUM_TYPE_METHODS
attribute, 6-8
OCI_ATTR_OBJECT
environment handle attribute, B-13
OCI_ATTR_OBJID
attribute, 6-6, 6-12
OCI_ATTR_ORDER
attribute, 6-12
OCI_ATTR_ORDER_METHOD
attribute, 6-8
OCI_ATTR_OVERLOAD
attribute, 6-7
OCI_ATTR_PARAM_COUNT
describe handle attribute, B-27
statement handle attribute, B-22
OCI_ATTR_PARTITIONED
attribute, 6-6
OCI_ATTR_PASSWORD
user session handle attribute, B-20
OCI_ATTR_PDFMT
bind handle attribute, B-25
define handle attribute, B-27
OCI_ATTR_PDSCL
bind handle attribute, B-25
define handle attribute, B-27
OCI_ATTR_PIN_DURATION
environment handle attribute, B-15
OCI_ATTR_PINOPTION
environment handle attribute, B-15
OCI_ATTR_POSITION
attribute, 6-14
OCI_ATTR_PRECISION
attribute, 6-9, 6-11, 6-13-6-14
OCI_ATTR_PREFETCH_MEMORY
statement handle attribute, B-23
OCI_ATTR_PREFETCH_ROWS
statement handle attribute, B-23
OCI_ATTR_PTYPE
attribute, 6-5
OCI_ATTR_RADIX
attribute, 6-14
OCI_ATTR_REF_TDO
attribute, 6-8-6-9, 6-11, 6-13, 6-15
OCI_ATTR_ROWID
statement handle attribute, B-22
OCI_ATTR_ROWS_RETURNED
bind handle attribute, B-25
use with callbacks, 5-26
OCI_ATTR_SCALE
attribute, 6-9, 6-11, 6-13-6-14
OCI_ATTR_SCHEMA
attribute, 6-12
OCI_ATTR_SCHEMA_NAME
attribute, 6-9, 6-11, 6-13, 6-15
OCI_ATTR_SEQ
attributes, 6-12
OCI_ATTR_SERVER
service context handle attribute, B-17
OCI_ATTR_SESSION
service context handle attribute, B-17
OCI_ATTR_SQLCODE
service context handle attribute, B-15
OCI_ATTR_STMT_TYPE
statement handle attribute, B-22
OCI_ATTR_SUB_NAME
attribute, 6-15
OCI_ATTR_TABLESPACE
attribute, 6-6
OCI_ATTR_TIMESTAMP
attribute, 6-5
OCI_ATTR_TRANS
service context handle attribute, B-17
OCI_ATTR_TRANS_NAME
transaction handle attribute, B-20
OCI_ATTR_TYPE_NAME
attribute, 6-9, 6-11, 6-13, 6-15
OCI_ATTR_TYPECODE
attribute, 6-8-6-9, 6-11, 6-14
OCI_ATTR_USRNAME
user session handle attribute, B-20
OCI_ATTR_VERSION
attribute, 6-8
OCI_ATTR_XID
transaction handle attribute, B-20
OCI_PTYPE_ARG
attributes, 6-14
OCI_PTYPE_COL
attributes, 6-13
OCI_PTYPE_COLL
attributes, 6-11
OCI_PTYPE_FUNC
attributes, 6-7
OCI_PTYPE_LIST
attributes, 6-16
OCI_PTYPE_PKG
attributes, 6-7
OCI_PTYPE_PROC
attributes, 6-7
OCI_PTYPE_SYN
attributes, 6-12
OCI_PTYPE_TABLE
attributes, 6-6
OCI_PTYPE_TYPE
attributes, 6-8
OCI_PTYPE_TYPE_ATTR
attributes, 6-9
OCI_PTYPE_TYPE_FUNC
attributes, 6-10
OCI_PTYPE_TYPE_PROC
attributes, 6-10
OCI_PTYPE_VIEW
attributes, 6-6
OCI_TYPECODE values, 3-24
OCIArray, 9-18
binding and defining, 9-18, 10-6
OCIArray manipulation
code example, 9-20
OCIAttrGet(), 13-8
used for describing, 4-9
OCIAttrSet(), 13-9
OCIBindArrayOfStruct(), 13-11
OCIBindByName(), 13-12
OCIBindByPos(), 13-16
OCIBindDynamic(), 13-20
OCIBindObject(), 13-23
OCICacheFlush(), 14-10
OCICacheFree(), 14-12
OCICacheRefresh(), 14-13
OCICacheUnmark(), 14-15
OCICacheUnpin(), 14-16
OCIColl, 9-18
binding and defining, 9-18
OCICollAppend(), 15-8
OCICollAssign(), 15-9
OCICollAssignElem(), 15-10
OCICollGetElem(), 15-11
OCICollMax(), 15-13
OCICollSize(), 15-14
OCICollTrim(), 15-16
OCIDate, 9-7
binding and defining, 9-7, 10-6
OCIDate manipulation
code example, 9-9
OCIDateAddDays(), 15-17
OCIDateAddMonths(), 15-18
OCIDateAssign(), 15-19
OCIDateCheck(), 15-20
OCIDateCompare(), 15-21
OCIDateDaysBetween(), 15-22
OCIDateFromText(), 15-23
OCIDateGetDat(), 15-24
OCIDateGetTime(), 15-25
OCIDateLastDay(), 15-26
OCIDateNextDay(), 15-27
OCIDateSetDate(), 15-28
OCIDateSetTime(), 15-29
OCIDateSysDate(), 15-30
OCIDateToText(), 15-31
OCIDateZoneToZone(), 15-32
OCIDefineArrayOfStruct(), 13-26
OCIDefineByPos(), 13-27
OCIDefineDynamic(), 13-30
OCIDefineObject(), 13-32
OCIDescAlloc(), 13-37
OCIDescFree(), 13-38
OCIDescribeAny(), 13-34
usage examples, 6-17
using, 6-2
OCIEnvInit(), 13-39
OCIErrorGet(), 13-40
OCIExtProcAllocCallmemory(), 16-4
OCIExtProcGetEnv(), 16-7
OCIExtProcRaiseExcp(), 16-5
OCIExtProcRaiseExcpWithMsg(), 16-6
OCIHandleAlloc(), 13-42
OCIHandleFree(), 13-44
OCIInitialize(), 13-45
OCIIter, 9-18
binding and defining, 9-18
usage example, 9-20
OCIIterCreate(), 15-33
OCIIterDelete(), 15-34
OCIIterGetCurrent(), 15-35
OCIIterInit(), 15-36
OCIIterNext(), 15-37
OCIIterPrev(), 15-38
OCILdaToSvcCtx(), 13-47
OCILobAppend(), 13-48
OCILobAssign(), 13-49
OCILobCharSet(), 13-51-13-52
OCILobCopy(), 13-53
OCILobDisableBuffering(), 13-55
OCILobEnableBuffering(), 13-56
OCILobErase(), 13-57
OCILobFileClose(), 13-58
OCILobFileCloseAll(), 13-59
OCILobFileExists(), 13-60
OCILobFileIsOpen(), 13-62
OCILobFileOpen(), 13-63
OCILobFlushBuffer(), 13-65
OCILobGetFile(), 13-61
OCILobGetLength(), 13-66
OCILobIsEqual(), 13-67
OCILobLoadFromFile(), 13-68
OCILobLocatorIsInit(), 13-70
OCILobRead(), 13-71
OCILobSetFile(), 13-64
OCILobTrim(), 13-74
OCILobWrite(), 13-75
OCILogoff(), 13-78
OCILogon(), 13-79
using, 2-18
OCINumber, 9-11
bind example, 10-7
binding and defining, 9-11, 10-6
define example, 10-7
OCINumber manipulation
code example, 8-14, 9-14
OCINumberAbs(), 15-39
OCINumberAdd(), 15-40
OCINumberArcCos(), 15-41
OCINumberArcSin(), 15-42
OCINumberArcTan(), 15-43
OCINumberArcTan2(), 15-44
OCINumberAssign(), 15-45
OCINumberCeil(), 15-46
OCINumberCompare(), 15-47
OCINumberCos(), 15-48
OCINumberDiv(), 15-49
OCINumberExp(), 15-50
OCINumberFloor(), 15-51
OCINumberFromInt(), 15-52
OCINumberFromReal(), 15-53
OCINumberFromText(), 15-54
OCINumberHypCos(), 15-55
OCINumberHypSin(), 15-56
OCINumberHypTan(), 15-57
OCINumberIntPower(), 15-58
OCINumberIsZero(), 15-59
OCINumberLn(), 15-60
OCINumberLog(), 15-61
OCINumberMod(), 15-62
OCINumberMul(), 15-63
OCINumberNeg(), 15-64
OCINumberPower(), 15-65
OCINumberRound(), 15-66
OCINumberSetZero(), 15-67
OCINumberSign(), 15-68
OCINumberSin(), 15-69
OCINumberSqrt(), 15-70
OCINumberSub(), 15-71
OCINumberTan(), 15-72
OCINumberToInt(), 15-73
OCINumberToReal(), 15-74
OCINumberToText(), 15-75
OCINumberTrunc(), 15-76
OCIObjectArrayPin(), 14-17
OCIObjectCopy(), 14-18
OCIObjectExists(), 14-20
OCIObjectFlush(), 14-21
OCIObjectFree(), 14-22
OCIObjectGetAttr(), 14-24
OCIObjectGetInd(), 14-26
OCIObjectGetObjectRef(), 14-27
OCIObjectGetTypeRef(), 14-28
OCIObjectIsDirty(), 14-29
OCIObjectIsLocked(), 14-30
OCIObjectLock(), 14-31
OCIObjectMarkDelete(), 14-32
OCIObjectMarkDeleteByRef(), 14-33
OCIObjectMarkUpdate(), 14-34
OCIObjectNew(), 14-35
OCIObjectPin(), 14-38
OCIObjectPinCountReset(), 14-40
OCIObjectPinTable(), 14-41
OCIObjectRefresh(), 14-42
OCIObjectSetAttr(), 14-44
OCIObjectUnmark(), 14-46
OCIObjectUnmarkByRef(), 14-47
OCIObjectUnpin(), 14-48
OCIParamGet(), 13-80
used for describing, 4-9
OCIParamSet(), 13-81
OCIPasswordChange(), 13-82
OCIRaw, 9-17
binding and defining, 9-17, 10-6
OCIRaw manipulation
code example, 9-18
OCIRawAllocSize(), 15-77
OCIRawAssignBytes(), 15-78
OCIRawAssignRaw(), 15-79
OCIRawPtr(), 15-80
OCIRawResize(), 15-81
OCIRawSize(), 15-82
OCIRef, 9-23
binding and defining, 9-23
usage example, 9-24
OCIRefAssign(), 15-83
OCIRefClear(), 15-84
OCIRefFromHex(), 15-85
OCIRefHexSize(), 15-86
OCIRefIsEqual(), 15-87
OCIRefIsNull(), 15-88
OCIRefToHex(), 15-89
OCISBreak()
use of, 2-30
OCIServerAttach(), 13-84
OCIServerDetach(), 13-86
OCIServerVersion(), 13-87
OCISessionBegin(), 13-88
OCISessionEnd(), 13-91
OCIStmtExecute(), 13-92
prefetch during, 4-6
use of iters parameter, 4-6
OCIStmtFetch(), 13-95
OCIStmtGetBind(), 13-96
OCIStmtGetPieceInfo(), 13-98
OCIStmtPrepare(), 13-99
preparing SQL statements, 4-4
OCIStmtSetPieceInfo(), 13-100
OCIString, 9-16
binding and defining, 9-16, 10-6
OCIString manipulation
code example, 9-16
OCIStringAllocSize(), 15-90
OCIStringAssign(), 15-91
OCIStringAssignText(), 15-92
OCIStringPtr(), 15-93
OCIStringResize(), 15-94
OCIStringSize(), 15-95
OCISvcCtxBreak(), 13-25
OCISvcCtxToLda(), 13-101
OCITable, 9-18
binding and defining, 9-18, 10-6
OCITableDelete(), 15-96
OCITableExists(), 15-97
OCITableFirst(), 15-98
OCITableLast(), 15-99
OCITableNext(), 15-100
OCITablePrev(), 15-101
OCITableSize(), 15-102
OCITransCommit(), 13-102
OCITransDetach(), 13-103
OCITransForget(), 13-104
OCITransPrepare(), 13-105
OCITransRollback(), 13-106
OCITransStart(), 13-107
OCITypeArrayByName(), 13-109
OCITypeArrayByRef(), 13-111
OCITypeByName(), 13-112
OCITypeByRef(), 13-114
OID. See object identifier, 8-6
Oracle Call Interface. See OCI, 1-10
Oracle datatypes, 3-2
mapping to C, 9-3
Oracle Security Services, 7-33
Oracle8 datatypes
binding and defining, 10-6
oratypes.h
contents, 3-28
ORE. See object runtime environment, 8-10
OTT
command line, 12-6
command line syntax, 12-22
creating types in the database, 12-5
datatype mappings, 12-10
invoking, 12-5
outtype file, 12-16
overview, 12-2
parameters, 12-24
providing an intype file, 12-8
reference, 12-22
restrictions, 12-37
using, 12-1-12-2
OTT parameters
CASE, 12-27
CODE, 12-25
CONFIG, 12-27
ERRTYPE, 12-27
HFILE, 12-26
INITFILE, 12-26
INITFUNC, 12-26
INTYPE, 12-24
OUTTYPE, 12-25
SCHEMA_NAMES, 12-28
USERID, 12-24
where they appear, 12-28
OTT. See object type translator, 8-8
outtype file, 12-29
when running OTT, 12-16
OUTTYPE OTT parameter, 12-25

P

packages
attributes, 6-7
describing, 6-2
parameter descriptor, 2-14
attributes, B-28
parameter descriptor object, 9-25
parameter descriptors
attributes, 6-5
parameters
attributes, 6-5
modes, 13-7, 16-3
passing strings, 2-28
string length, 13-6
password management, 7-11-7-12
PDO. See parameter descriptor object, 9-25
persistent objects, 8-6
meta-attributes, 8-17
piecewise fetch, 7-21
piecewise operations, 7-18
fetch, 7-16, 7-22
in PL/SQL, 7-21
insert, 7-16
update, 7-16
valid datatypes, 7-18
pin count, 8-25
pin duration
example, 11-15
of objects, 11-14
pinning, 11-7
pinning objects, 11-7
PL/SQL, 1-7
binding and defining nested tables, 5-29
binding and defining ref cursors, 5-29
binding placeholders, 2-32
defining output variables, 5-17
piecewise operations, 7-21
uses in OCI applications, 2-32
using in OCI applications, 2-32
using in OCI programs, 5-7
positioned deletes, 2-31
positioned updates, 2-31
prefetching
during OCIStmtExecute(), 4-6
setting prefetch memory size, 4-13
setting row count, 4-13
procedures
attributes, 6-7

Q

query
explicit describe, 4-11
query. See SQL query, 4-12, 5-14, 10-4
Quick reference to OCI relational functions, 13-3

R

RAW
external datatype, 3-14
REF
binding, 5-10, 10-3
defining, 5-17, 10-4
external data types, 3-18
indicator variable for, 2-28
retrieving from server, 8-11
ref cursor variables
binding, 5-12
ref cursors
binding and defining, 5-29
reference. See REF, 8-11
refreshing, 11-11
refreshing objects, 11-11
REFs
indicator variables for, 2-30
relational functions
server roundtrips, E-7
release 8.0 enhancements, F-2
reserved namespaces, C-11
reserved words, C-2
resuming branches, 7-7
RETRNING clause
error handling, 5-24
return values
navigational functions, 14-4
RETURNING clause
binding with, 5-23
code example, D-22
using with OCI, 5-22
with REFs, 5-24
rollback, 2-23
in object applications, 11-14
roundtrips
See server roundtrips, E-2
ROWID
external data type, 3-13
used for positioned updates and
deletes, 2-31
ROWID descriptor, 2-14

S

sb1
definition, 3-28
sb2
definition, 3-28
sb4
definition, 3-28
SCHEMA_NAMES OTT parameter, 12-28
usage, 12-33
secondary memory
of object, 11-16
security handle, 2-10
select-list
describing, 4-8
sequences
attributes, 6-12
describing, 6-2
server handle
attributes, B-18
description, 2-8
multiple, 2-21
setting in service context, 2-9
server roundtrips
cache functions, E-4
datatype mapping and manipulation
functions, E-6
describe operation, E-5
LOB functions, E-2
object functions, E-4
relational functions, E-7
service context handle
attributes, B-15
description, 2-8
elements of, 2-8
multiple, 2-21
sessions
creating, 2-18, 2-19, 2-21, 7-11, 7-12
credentials, 7-12
migratable & non-migratable, 7-11, 7-12
single-task linking
support, A-10
skip parameter
for standard arrays, 5-20
skip parameters
for arrays of structures, 5-19
snapshot descriptor, 2-12
snapshots
executing against, 4-7
SQL Command Codes
listing, B-16
SQL processing
code example, D-2
SQL query
binding placeholders. See bind
operation, 4-12
defining output variables, 4-12, 5-14, 10-4
defining output variables. See define
operation, 4-12
fetching results, 4-12
statement type, 1-6
SQL statements, 1-4
binding placeholders in, 4-5, 5-2, 10-2
determining type prepared, 4-4
executing, 4-6
preparing for execution, 4-4
processing, 4-2
types
control statements, 1-5
data definition language, 1-4
data manipulation language, 1-5
embedded SQL, 1-8
PL/SQL, 1-7
queries, 1-6
SQLT typecodes, 3-25
SQLT_NTY
bind example, 10-13
define example, 10-15
SQLT_REF
definition, 3-18
statement handle
attributes, B-21
description, 2-9
static arrays
binding, 5-10
defining, 5-18
stored functions
describing, 6-2
stored procedures
describing, 6-2
STRING
external datatype, 3-11
strings
passing as parameters, 2-28
structures
arrays of, 5-18
sword
definition, 3-28
synonyms
attributes, 6-12
describing, 6-2

T

tables
attributes, 6-6
describing, 6-2
TDO
description, 9-25
obtaining, 9-25
TDO. See also type descriptor object, 9-25
terminology
navigational functions, 14-4
used in this manual, 1-8
thread safety, 7-13
advantages of, 7-13
and three-tier architectures, 7-14
basic concepts, 7-14
implementing with OCI, 7-14
mixing 7.x and 8.0 calls, 7-16
required OCI calls, 7-14
three-tier architectures
and thread safety, 7-14
top-level memory
of object, 11-16
transaction handle
attributes, B-20
description, 2-9
transaction identifier, 7-5
transactional complexity
levels in OCI, 7-3
transactions
committing, 2-23
global, 7-4
branch states, 7-7
branches, 7-5
one-phase commit, 7-8
transaction identifier, 7-5
two-phase commit, 7-8
global examples, 7-9
initialization parameters, 7-10
local, 7-4
multiple, 2-21
OCI functions for
transactions, 7-3
read-only, 7-4
rolling back, 2-23
serializable, 7-4
transient objects, 8-7
LOB attributes, 7-26
meta-attributes, 8-18
type attributes
attributes, 6-9
type descriptor object, 9-25
type descriptor object. See also TDO, 9-25
type functions
attributes, 6-10
type procedures
attributes, 6-10
type reference, 8-29
typecodes, 3-24
types
attributes, 6-8
describing, 6-2

U

ub1
definition, 3-28
ub2
definition, 3-28
ub4
definition, 3-28
unmarking, 11-10
unmarking objects, 11-10
unpinning, 8-25, 11-9
unpinning objects, 11-9
UNSIGNED
external datatype, 3-15
update
piecewise, 7-16, 7-18
updates
positioned, 2-31
upgrading
7.x to 8.0, A-5
7.x to 8.0 OCI, A-6
user authentication, 7-11
user memory
allocating, 2-15
user session handle
attributes, B-20
description, 2-8
multiple, 2-21
setting in service context, 2-9
user session. See session.
USERID OTT parameter, 12-24

V

values, 8-6
in object applications, 8-7
VARCHAR
external datatype, 3-13
VARCHAR2
external datatype, 3-8
VARNUM
external datatype, 3-12
VARRAW
external datatype, 3-15
views
attributes, 6-6
describing, 6-2

W

with_context
argument to external procedure functions, 16-2

X

XID. See transaction identifier, 7-5
xtramem_sz parameter
using, 2-15


Prev
Oracle
Copyright © 1997 Oracle Corporation.

All Rights Reserved.

Library

Product

Contents