Pro*C/C++ Precompiler Programmer's Guide
Release 8.1.5

A68022-01

Library

Product

Contents

Prev

Index

A  B  C  D  E  F  G  H  I  J  K  L  M  N  O  P  Q  R  S  T  U  V  W  X  Y  Z 


Symbols

#include
file inclusion, Pro*C compared to C, 5-29

A

abnormal termination
automatic rollback, F-26
active set
changing, 6-13, 6-14
cursor movement through, 6-14
definition of, 2-8
how identified, 6-12
if empty, 6-14
when fetched from, 6-14
when no longer defined, 6-12
ALLOCATE
allocating a cursor variable, 4-27
ALLOCATE DESCRIPTOR statement, 14-13, F-14
ALLOCATE SQL statement, 17-5
ALLOCATE SQL statements, F-12
allocating
cursor variables, 4-27
cursors, F-12
thread context, 11-8, F-28
angle brackets, xxxvi
ANSI
compliance, xxxvii
ANSI C Support, E-2
ANSI dynamic SQL, A-4
reference semantics, 14-7
See also dynamic SQL (ANSI), 14-1
ANSI, address of, xxxvii
application development process, 2-9
array of structs, 8-17, A-2
ARRAYLEN statement, 7-17
arrays
batch fetch, 8-5
bulk operations (ANSI dynamic SQL), 14-8
chapter discusses how to use, 8-1
definition of, 4-41
host arrays, 2-7
operations, 2-7
varying length, 18-3
associative interface, 17-4
when to use, 17-4
AT clause
in CONNECT statement, 3-9
in DECLARE CURSOR statement, 3-10
in DECLARE STATEMENT statement, 3-12
in EXECUTE IMMEDIATE statement, 3-11
of COMMIT statement, F-25
of DECLARE CURSOR directive, F-36
of DECLARE STATEMENT directive, F-39
of EXECUTE IMMEDIATE statement, F-57
of EXECUTE statement, F-52
of INSERT statement, F-70
of SAVEPOINT statement, F-103
of SELECT statement, F-106
of UPDATE statement, F-114
restriction on, 3-11
use of, 3-10
attributes of a collection
descriptions, 18-15
AUTO_CONNECT, 10-11
precompiler option, 3-5
AUTO_CONNECT precompiler option, 10-11
automatic connections, 3-4, 3-8

B

batch fetch
advantage of, 8-5
example of, 8-5
number of rows returned by, 8-7
BFILES, 16-2
security, 16-2
bind descriptor, 13-26, 15-5
definition of, 13-26
information in, 13-26
bind SQLDA
purpose of, 15-3
bind variables
input host variables, 13-26
binding
definition of, 13-4
BNF notation, xxxvi
braces, xxxvi
brackets, xxxvi
BREAK action
of WHENEVER, F-120
Byte Ordering, E-2

C

C preprocessor
directives supported by Pro*C, 5-28
how used in Pro*C, 5-28
C structs
generating for a REF, 17-33
using, 17-32
C types of collection attributes, 18-15
C variable in SQLDA
how value is set, 15-11
purpose of, 15-11
C++, 1-8
C++ applications, 12-1
cache, 17-4
CACHE FREE ALL SQL statement, 17-6
CACHE FREE ALL statement, F-15
CALL SQL statement, F-16
CALL statement, 7-27, A-2
example, 7-28
Calling Java from PL/SQL, A-5
CASE OTT parameter, 19-30
case sensitivity
in precompiler options, 10-2
CHAR datatype, 4-10
CHAR_MAP precompiler option, 5-2, 10-12, A-3
character data, 5-2
character strings
multibyte, 4-52
CHARF datatype, 4-11, 5-15
CHARZ datatype, 4-11
CLOSE CURSOR statement, 14-27
CLOSE SQL statements, F-18
CLOSE statement, 6-15
dependence on precompiler options, 6-15
example of, 6-15
examples, F-19
purpose of, 6-12, 6-15
use in dynamic SQL method 4, 15-37
CLOSE_ON_COMMIT
precompiler option, 10-12, A-5
closing
cursors, F-18
CODE
precompiler option, 12-3
CODE OTT parameter, 19-28
code page, 4-49
CODE precompiler option, 10-13
coding conventions, 2-11
COLLECT GET statement
example, 18-19
COLLECTION APPEND, F-19
COLLECTION APPEND statement, 18-12
SQL statements
COLLECTION APPEND, F-19
COLLECTION DESCRIBE
example, 18-21
COLLECTION DESCRIBE statement, 18-14
SQL statements
COLLECTION DESCRIBE, F-20
COLLECTION GET statement, 18-8
SQL statements
COLLECTION GET, F-21
collection object types
handling, 18-4
COLLECTION RESET statement, 18-11
example, 18-22
SQL statements
COLLECTION RESET, F-22
COLLECTION SET statement, 18-10
example, 18-19
SQL statements
COLLECTION SET, F-23
COLLECTION TRIM statement, 18-13
SQL statements
COLLECTION TRIM, F-24
collection types
structs for, 18-3
collections, A-4
and C, 18-3
autonomous access, 18-4
descriptors, 18-3
element access, 18-5
manipulating, 18-4
nested tables, 18-2
OBJECT GET statement, 18-6
OBJECT SET statement, 18-6
VARRAYs, 18-3
column list
in INSERT statements, 6-9
when permissible to omit, 6-9
COMMENT clause
of COMMIT statement, F-25
Comments
restrictions in PL/SQL block, 13-31
comments
ANSI, 2-11
which allowed, 2-11
commit
automatic, 3-17
explicit versus implicit, 3-17
function of, 3-16
COMMIT SQL statement, F-24
COMMIT statement, 3-18
effect of, 3-18
ending a transaction, F-101
example of, 3-18
examples, F-26
purpose of, 3-18
RELEASE option in, 3-18
using in a PL/SQL block, 3-28
where to place, 3-18
committing
transactions, F-24
communicating over a network, 3-6
COMP_CHARSET precompiler option, 10-14
compiling, 2-18
specifying include file locations, 5-35
compliance
ANSI, xxxvii
ISO, xxxvii
NIST, xxxvii
concurrency
definition of, 3-16
concurrent connections, 3-7
conditional precompilation, 2-16
defining symbols, 5-42
example, 2-16, 5-43
CONFIG OTT parameter, 19-29
CONFIG precompiler option, 10-15
configuration files, 10-5
and the Object Type Translator, 19-5
location, 10-6
system, 10-3
user, 10-3
CONNECT statement, F-26
AT clause in, 3-9
connecting to Oracle with, 3-2
examples, F-28
requirements for, 3-2
USING clause in, 3-9
using to enable a semantic check, D-4
connecting to Oracle, 3-2
automatic connections, 3-4
concurrently, 3-7
example of, 3-2
using Net8, 3-7
connections
concurrent, 3-12
default versus non-default, 3-8
Explicit connections, 3-8
implicit, 3-14
naming of, 3-8
const
declaring constants, 5-45
CONTEXT ALLOCATE SQL statement, F-28
CONTEXT ALLOCATE statement, 11-8
context block
definition of, 20-4
CONTEXT FREE statement, 11-10, F-29
CONTEXT OBJECT OPTION GET SQL statement, 17-18
CONTEXT OBJECT OPTION SET SQL statement, 17-17
CONTEXT USE directive, 11-9
CONTEXT USE SQL directive, F-33
CONTEXT USE SQL statement, 11-9
CONTINUE action
in the WHENEVER statement, 9-25
of WHENEVER directive, F-120
result of, 9-25
CONVBUFSZ clause, 4-51
conventions
description of, xxxvi
notation, xxxvi
CPP_SUFFIX
precompiler option, 12-5
CPP_SUFFIX precompiler option, 10-15
CPP_SUFFIX precompiler options, 10-15
CREATE PROCEDURE statement
embedded, 7-21
creating
savepoints, F-103
creating temporary LOB, 16-15
curly brackets, xxxvi
CURRENT OF clause, 8-4
example of, 6-17
mimicking with ROWID, 3-26, 8-28
purpose of, 6-17
restrictions on, 6-17
current row
definition of, 2-8
using FETCH to retrieve, 6-12
cursor cache
definition of, 9-37
purpose of, C-9
cursor control statements
example of typical sequence, 6-18
cursor operations
overview of, 6-11
cursor variables, 4-26, F-12
allocating, 4-27
declaring, 4-26
restrictions on, 4-32
use of in recursive functions, 1-11
cursors, 2-17, 4-26
allocating, F-12
allocating a cursor variable, 4-27
analogy for, 2-8
association with queries, 6-11
closing, F-18
closing before reopening, 6-13
declaring, 6-12
definition of, 2-8
explicit versus implicit, 2-8
fetching rows from, F-58, F-61
for multirow queries, 6-11
how handling affects performance, C-7
movement through active set, 6-14
opening, F-92, F-94
purpose of, 6-11
reopening, 6-13, 6-14
restrictions on declaring, 6-13
rules for naming, 6-12
scope of, 6-13
statements for manipulating, 6-11
types of, 2-8
using more than one, 6-13
when closed automatically, 6-15

D

data definition statements
in transactions, 3-17
data integrity, 3-13
definition of, 3-16
data locks, 3-16
database link
creating synonym for, 3-14
defining, 3-14
example using, 3-14
using in INSERT statement, F-70
where stored, 3-14
database types
new, 17-35
databases
naming, 3-8
datatype codes
used in descriptors, 15-15
datatype conversions, 5-11, 5-12
datatype equivalencing, 2-7, 5-12
purpose of, 2-7
datatype mappings, 19-10
datatypes
coercing NUMBER to VARCHAR2, 15-15
dealing with ORACLE internal, 15-15
internal, 4-2
internal versus external, 2-7
list of internal, 15-13
need to coerce, 15-15
Oracle, 2-7
restrictions on using, 17-38
user-defined type equivalencing, F-111
when to reset, 15-15
DATE datatype, 4-8
DBMS interaction with MODE, 10-17
DBMS option, 5-15
DBMS precompiler option, 10-16
DDL in transactions, 3-17
deadlock
definition of, 3-16
effect on transactions, 3-22
how broken, 3-22
DEALLOCATE DESCRIPTOR statement, 14-14, F-34
declaration
of cursors, 6-12
of host arrays, 8-2
of pointer variables, 4-46
of SQLCA, 9-16
declarative SQL statements
in transactions, 3-17
uses for, 2-3
where allowed, 2-3
DECLARE CURSOR directives
examples, F-37
DECLARE CURSOR statement, 14-25
AT clause in, 3-10
use in dynamic SQL method 4, 15-25
DECLARE DATABASE SQL directives, F-37
Declare Section
allowable statements, 2-12
form, 2-11
purpose, 2-11
required when MODE=ANSI, 10-31
requirements, 2-11
rules for defining, 2-12
when MODE=ANSI, 5-15
when required, 2-11, 4-12
DECLARE statement, 6-13
example of, 6-12
purpose of, 6-11
required placement of, 6-12
scope of, F-40
use in dynamic SQL method 3, 13-20
DECLARE STATEMENT directive, F-39
DECLARE STATEMENT statement
AT clause in, 3-12
example of using, 13-28
using with dynamic SQL, 13-28
when required, 13-28
DECLARE statements
examples, F-40
DECLARE TABLE directive
examples, F-41
using with the SQLCHECK option, D-5
DECLARE TABLE SQL directive, F-40
DECLARE TABLE statement
need for with AT clause, 3-10
DECLARE TYPE directive, F-42
DEF_SQLCODE precompiler option, 10-17
default connections, 3-8
default database, 3-7
default file name extensions, 19-38
DEFINE precompiler option, 10-18
used in application migration, 5-35
defining symbols, 2-16
DELETE CASCADE, 9-21
DELETE SQL statement, F-43
DELETE statement
embedded SQL examples, F-46
example of, 6-10
purpose of, 6-10
using host arrays in, 8-13
WHERE clause in, 6-10
delimiters
C versus SQL, 2-12
DEPT table, 2-18
DESCRIBE BIND VARIABLES statement
use in dynamic SQL method 4, 15-25
DESCRIBE command
use with PREPARE command, F-47
DESCRIBE DESCRIPTOR statement, F-49
DESCRIBE INPUT statement, 14-22
DESCRIBE OUTPUT statement, 14-22
DESCRIBE SELECT LIST statement
use in dynamic SQL method 4, 15-30
DESCRIBE SQL statement, F-47
DESCRIBE statement
examples, F-48
use in dynamic SQL Method 4, 13-26
descriptions of collection attributes, 18-15
descriptors, 15-4
bind descriptor, 13-26
definition of, 13-25
need for, 15-4
select descriptor, 13-26
using the sqlald() function to allocate, 15-5
using the sqlclu() function to deallocate, 15-37
determining current value of precompiler options, 10-4
directives, 2-3
distributed processing
support for, 3-7
using Net8 for, 3-7
distributed transactions, F-102
DML Returning Clause, A-5
DML returning clauses, 6-11
DO action
in the WHENEVER statement, 9-25
of WHENEVER directive, F-120
result of, 9-25
dots, xxxvi
DTP model, 5-54
dummy host variables
placeholders, 13-3
DURATION precompiler option, 10-20, 17-20
dynamic PL/SQL
rules for, 13-29
versus dynamic SQL, 13-29
dynamic SQL
advantages and disadvantages of, 13-2
cannot use cursor variables with, 4-32
choosing the right method, 13-6
definition of, 2-6
guidelines for, 13-6
overview of, 13-2
restriction on, 6-18
restrictions on use of datatypes, 17-38
restrictions on using datatypes in, 17-38
use of PL/SQL with, 7-33
uses for, 13-2
using the AT clause in, 3-11
when to use, 13-2
dynamic SQL (ANSI)
basics, 14-2
bulk operations, 14-8
differences from Oracle dynamic, 14-28
Oracle extensions, 14-7
Overview, 14-3
Precompiler Options, 14-2
precompiler options, 14-11
reference semantics, 14-7
sample program, 14-37
sample programs, 14-29
dynamic SQL method 1
commands used with, 13-5
description of, 13-9
example of, 13-9
how to use, 13-8
requirements for, 13-5
use of EXECUTE IMMEDIATE with, 13-9
use of PL/SQL with, 13-30
dynamic SQL Method 2
use of DECLARE STATEMENT with, 13-28
use of PL/SQL with, 13-30
dynamic SQL method 2
commands used with, 13-5
description of, 13-13
example of, 13-15
requirements for, 13-5
use of EXECUTE with, 13-13
use of PREPARE with, 13-13
dynamic SQL Method 3
use of DECLARE STATEMENT with, 13-28
use of PL/SQL with, 13-30
dynamic SQL method 3
commands used with, 13-5
compared to method 2, 13-19
example program, 13-21
requirements for, 13-5
sequence of statements used with, 13-19
use of DECLARE with, 13-20
use of FETCH with, 13-20
use of OPEN with, 13-20
use of PREPARE with, 13-19
dynamic SQL Method 4
overview of, 13-25, 13-26
sequence of statements used with, 13-27
use of DECLARE STATEMENT with, 13-28
use of DESCRIBE in, 13-26
use of descriptors with, 13-25
use of the SQLDA in, 13-26
using the FOR clause with, 13-29
when needed, 13-25
dynamic SQL method 4
need for descriptors with, 15-4
prerequisites for using, 15-12
requirements for, 13-6
requirements of, 15-2
sequence of statements used with, 15-20
steps for, 15-19
use of CLOSE statement in, 15-37
use of DECLARE CURSOR statement in, 15-25
use of DESCRIBE statement in, 15-25, 15-30
use of FETCH statement in, 15-35
use of OPEN statement in, 15-30
use of PL/SQL with, 13-30
use of PREPARE statement in, 15-25
use of the SQLDA in, 15-4
using host arrays with, 15-37
using the FOR clause with, 15-37
dynamic SQL Method 4 sample program, 15-40
dynamic SQL methods
overview of, 13-4
dynamic SQL statements
binding of host variables in, 13-4
definition of, 13-2
how processed, 13-4
parsing of, 13-4
requirements for, 13-3
use of placeholders in, 13-3
using host arrays in, 13-29
versus static SQL statements, 13-2

E

ellipsis, xxxvi
embedded PL/SQL
advantages of, 7-2
cursor FOR loop, 7-3
example of, 7-7, 7-9
overview of, 2-6
packages, 7-4
PL/SQL tables, 7-5
procedures and functions, 7-3
requirements for, 7-6
SQLCHECK option, 7-7
support for SQL, 2-6
user-defined records, 7-5
using %TYPE, 7-2
using the VARCHAR pseudotype with, 7-11
using to improve performance, C-3
where allowed, 7-6
embedded SQL
ALLOCATE statement, F-12
CLOSE statement, F-18
CONTEXT ALLOCATE statement, 11-8, F-28
CONTEXT FREE statement, 11-10
definition of, 2-2
difference from interactive SQL, 2-5
ENABLE THREADS statement, 11-8
EXEC SQL CACHE FREE ALL, 17-6
EXECUTE statement, F-51
key concepts of, 2-2
mixing with host-language statements, 2-5
OPEN statement, F-92
overview of, 2-2
PREPARE statement, F-96
requirements for, 2-5
SAVEPOINT statement, F-103
SELECT statement, F-104
syntax for, 2-5
testing with SQL*Plus, 1-3
TYPE directive, F-111
UPDATE statement, F-112
using OCI types in, 17-34
using REFs in, 17-33
VAR directive, F-116
when to use, 1-3
WHENEVER directive, F-119
embedded SQL statements
labels for, 9-25
referencing host arrays in, 8-3
referencing host variables in, 4-15
suffixes and prefixes not allowed, 2-11
terminator for, 2-15
use of apostrophes in, 2-12
use of quotation marks in, 2-12
embedding
PL/SQL blocks in precompiler programs, F-51
EMP table, 2-18
ENABLE THREADS SQL statement, F-50
ENABLE THREADS statement, 11-8
enabling
threads, 11-8
encoding scheme (character set or code page), 4-49
enqueues
locking, 3-16
entering options, 5-31, 10-9
equivalencing
host variable equivalencing, F-116
user-defined type equivalencing, F-111
equivalencing of datatypes
datatype equivalencing, 2-7
error detection
error reporting, F-120
error handling, 2-9
alternatives, 9-2
need for, 9-2
overview of, 2-9
SQLCA versus WHENEVER statement, 9-3
use of ROLLBACK statement in, 3-21
error messages
maximum length of, 9-23
use in error reporting, 9-16
using the sqlglm() function to get, 9-22
where available in SQLCA, 9-16
error reporting
key components of, 9-14
use of error messages in, 9-16
use of parse error offset in, 9-15
use of rows-processed count in, 9-15
use of warning flags in, 9-15
WHENEVER directive, F-120
ERRORS precompiler option, 10-20
ERRTYPE
precompiler option, 10-21
ERRTYPE OTT parameter, 19-30
ERRTYPE precompiler option, 17-21
exception, PL/SQL
definition of, 7-13
EXEC ORACLE DEFINE statement, 5-42
EXEC ORACLE ELSE statement, 2-16, 5-42
EXEC ORACLE ENDIF statement, 2-16, 5-42
EXEC ORACLE IFDEF statement, 2-16, 5-42
EXEC ORACLE IFNDEF statement, 2-16, 5-42
EXEC ORACLE OPTION statement
set option values inline, 10-9
EXEC ORACLE statement
scope of, 10-10
syntax for, 10-9
uses for, 10-10
EXEC ORACLE statements, 2-16
EXEC SQL CACHE FREE statement, 17-6
EXEC SQL clause
using to embed SQL, 2-5
EXEC SQL INCLUDE
contrasted with #include, 5-35
EXEC SQL VAR statement
CONVBUFSZ clause, 4-51
EXEC TOOLS
GET CONTEXT statement, 20-16
GET statement, 20-15
MESSAGE statement, 20-17
SET CONTEXT statement, 20-16
SET statement, 20-15
EXEC TOOLS statements, 20-14
executable SQL statements
grouping of, 2-3
purpose of, 6-6
uses for, 2-3
where allowed, 2-3
EXECUTE ... END-EXEC SQL statement, F-51
EXECUTE DESCRIPTOR statement
SQL statements
EXECUTE DESCRIPTOR, F-55
EXECUTE IMMEDIATE SQL statement, F-57
EXECUTE IMMEDIATE statement, 14-24
AT clause in, 3-11
examples, F-58
use in dynamic SQL method 1, 13-9
EXECUTE optional keyword of ARRAYLEN statement, 7-18
EXECUTE SQL statement, F-53
EXECUTE statement, 14-23
examples, F-52, F-54
use in dynamic SQL method 2, 13-13
execution of statements, 13-4
execution plan, C-5, C-6
EXPLAIN PLAN statement
function of, C-6
using to improve performance, C-6
explicit connections, 3-8
description of, 3-8
multiple, 3-12
single, 3-9
extensions
default file name, 19-38
external datatypes
definition of, 2-7
FLOAT, 4-6
INTEGER, 4-6
STRING, 4-6
external procedures, A-5
callbacks, 7-29
calling from PL/SQL, 7-29
creating, 7-30
error-handling, 7-31
restrictions, 7-30

F

F variable in SQLDA
how value is set, 15-10
purpose of, 15-10
FETCH DESCRIPTOR SQL statement, F-61
FETCH SQL statement, F-58
FETCH statement, 14-26
example of, 6-14
examples, F-60
INTO clause in, 6-14
purpose of, 6-12, 6-14
results of, 6-14
use in dynamic SQL method 3, 13-20
use in dynamic SQL method 4, 15-35
used after OPEN command, F-96
used after OPEN statement, F-93
fetching
rows from cursors, F-58, F-61
fetching in batches
batch fetch, 8-5
FIPS flagger
warns of array usage, 8-4
warns of missing Declare Section, 4-12
warns of use of pointers as host variables, 5-7
FIPS precompiler option, 10-21
flags
warning flags, 9-15
FLOAT datatype, 4-6
FOR clause
example of using, 8-14
of embedded SQL EXECUTE DESCRIPTOR statement, F-56
of embedded SQL EXECUTE statement, F-54
of embedded SQL INSERT statement, F-70
purpose of, 8-14
requirements for, 8-15
restrictions on, 8-15
using in dynamic SQL method 4, 15-37
using with host arrays, 8-14
when variable negative or zero, 8-15
FOR UPDATE OF clause
locking rows with, 3-24
purpose of, 3-24
when to use, 3-24
FORCE clause
of COMMIT statement, F-26
of ROLLBACK statement, F-100
forward references
why not allowed, 6-12
FREE SQL statement, 17-6, F-63
free() function, 15-37
example of using, 15-37
freeing
thread context, 11-10, F-29
full scan
description of, C-6
function prototype
definition of, 10-13
functions
cannot serve as host variables, 4-16

G

GENXTB form
how to run, 20-12
use with user exits, 20-12
GENXTB utility
how to run, 20-13
use with user exits, 20-13
GET DESCRIPTOR statement, 14-14
GOTO action
in the WHENEVER statement, 9-25
of WHENEVER directive, F-120
result of, 9-25
guidelines
for dynamic SQL, 13-6
for separate precompilations, 2-17
for the WHENEVER statement, 9-29
for transactions, 3-27
for user exits, 20-13

H

HEADER precompiler option, 5-36, 10-23
heap
definition of, 9-37
HFILE OTT parameter, 19-29
hints
COST, C-5
for the ORACLE SQL statement optimizer, 6-16
in DELETE statements, F-46
in SELECT statements, F-107
in UPDATE statements, F-115
HOLD_CURSOR
precompiler option
used to improved performance, C-12
what it affects, C-7
HOLD_CURSOR option
of ORACLE Precompilers, F-18
HOLD_CURSOR precompiler option, 10-23
host arrays
advantages of, 8-2
declaring, 8-2
dimensioning, 8-2
in the DELETE statement, 8-13
in the INSERT statement, 8-11
in the SELECT statement, 8-5
in the UPDATE statement, 8-12
in the WHERE clause, 8-16
matching sizes of, 8-3
maximum size of, 8-2
referencing, 8-2, 8-3
restrictions on, 8-4, 8-10, 8-12, 8-13, 8-14
used as input host variables, 8-3
used as output host variables, 8-3
using in dynamic SQL method 4, 15-37
using in dynamic SQL statements, 13-29
using the FOR clause with, 8-14
using to improve performance, C-3
when not allowed, 8-2
host language
definition of, 2-2, 2-3
host program
definition of, 2-2
host structures
arrays in, 4-41
declaring, 4-39
host variables, 6-2
assigning values to, 2-6
declarations, 18-4
declaring, 2-11, 18-4
definition of, 2-6
dummy, 13-3
host variable equivalencing, F-116
in EXECUTE statement, F-54
in OPEN statement, F-93
in user exits, 20-4
input versus output, 6-2
must resolve to an address, 4-16
overview of, 2-6
purpose of, 6-2
requirements for, 2-6
restrictions on, 4-16
rules for naming, 2-14
using in PL/SQL, 7-7
where allowed, 2-6

I

I variable in SQLDA
how value is set, 15-10
purpose of, 15-10
IAF GET statement
example of using, 20-5
in user exits, 20-4
purpose of, 20-4
specifying block and field names in, 20-5
syntax for, 20-4
IAF PUT statement
example of using, 20-6
in user exits, 20-5
purpose of, 20-5
specifying block and field names in, 20-6
syntax for, 20-5
IAP in SQL*Forms
purpose of, 20-13
identifiers, ORACLE
how to form, F-11
implicit connections, 3-14
multiple, 3-15
single, 3-14
IN OUT parameter mode, 7-3
IN parameter mode, 7-3
INAME precompiler option, 10-25
INCLUDE
precompiler option, use of, 5-34
using to include the SQLCA, 9-16
INCLUDE precompiler option, E-3
indexes
using to improve performance, C-6
indicator arrays, 8-4
example of using, 8-4
uses for, 8-4
INDICATOR keyword, 4-16
indicator variables
assigning values to, 6-3
association with host variables, 6-3
declarations, 18-4
declaring, 4-16, 18-4
definition of, 2-6
function of, 6-3
guidelines, 4-18
interpreting values of, 6-3
naming of, 4-43
referencing, 4-16
requirements for, 6-4
used with multibyte character strings, 4-52
using in PL/SQL, 7-12
using to detect NULLs, 6-4
using to detect truncated values, 6-4
using to insert NULLs, 6-4
using to return NULLs, 6-5
using to test for NULLs, 6-5
with structures, 4-42
in-doubt transaction, 3-26
INITFILE OTT parameter, 19-29
INITFUNC OTT parameter, 19-29
initialization function
calling, 19-20
tasks of, 19-22
input host variables
assigning values to, 6-3
definition of, 6-2
restrictions on, 6-2
uses for, 6-2
where allowed, 6-2
insert of no rows
cause of, 9-20
INSERT SQL statement, F-68
examples, F-71
INSERT statement
column list in, 6-9
example of, 6-9
INTO clause in, 6-9
purpose of, 6-9
requirements for, 6-9
using host arrays in, 8-11
VALUES clause in, 6-9
inserting
rows into tables and views, F-68
INTEGER datatype, 4-6
interface
native, 5-54
XA, 5-54
internal datatypes
definition of, 2-7
INTO clause
for output host variables, 6-2
in FETCH statements, 6-14
in INSERT statements, 6-9
in SELECT statements, 6-8
of FETCH DESCRIPTOR statement, F-62
of FETCH statement, F-59
of SELECT statement, F-106
used with FETCH instead of SELECT, 6-12
intype file, 19-32
providing when running OTT, 19-8
structure of, 19-32
INTYPE OTT parameter, 19-27
INTYPE precompiler option, 10-26
invalid use
of precompiler preprocessor, 5-33
ISO
compliance, xxxvii

J

joins
restriction on, 6-18

L

L variable in SQLDA
how value is set, 15-8
purpose of, 15-8
label name
maximum length of, 9-25
Large Objects (LOBs), A-4
LDA, 5-50
remote and multiple connections, 5-50
setup for OCI rel 8, 5-50
lines
continuation, 2-14
maximum length, 2-14
LINES precompiler option, 10-27
link
database link, 3-14
linking, 2-18
on UNIX, 1-10
on VMS, 1-10
two-task, 2-18
Linking in an XA Library, E-3
LNAME precompiler option, 10-28
LNPROC
VMS link script, 1-10
LOB APPEND SQL statement, F-72
LOB APPEND statement, 16-12
LOB ASSIGN SQL statement, F-73
LOB ASSIGN statement, 16-12
LOB CLOSE SQL statement, F-73
LOB CLOSE statement, 16-13
LOB COPY SQL statement, F-74
LOB COPY statement, 16-14
LOB CREATE TEMPORARY SQL statement, F-74
LOB CREATE temporary statement, 16-15
LOB DESCRIBE SQL statement, F-75
LOB DISABLE BUFFERING SQL statement, F-76
LOB DISABLE BUFFERING statement, 16-16
LOB ENABLE BUFFERING SQL statement, F-77
LOB ENABLE BUFFERING statement, 16-16
LOB ERASE SQL statement, F-77
LOB ERASE statement, 16-17
LOB FILE CLOSE ALL SQL statement, F-78
LOB FILE CLOSE ALL statement, 16-17
LOB file close all statement, 16-17
LOB FILE SET SQL statement, F-79
LOB FILE SET statement, 16-18
LOB FLUSH BUFFER SQL statement, F-79
LOB FLUSH BUFFER statement, 16-19
LOB FREE TEMPORARY SQL statement, F-80
LOB FREE TEMPORARY statement, 16-19
LOB LOAD FROM FILE statement, 16-20
LOB LOAD SQL statement, F-80
LOB OPEN SQL statement, F-81
LOB OPEN statement, 16-21
LOB READ SQL statement, F-82
LOB READ statement, 16-22
LOB TRIM SQL statement, F-82
LOB WRITE SQL statement, F-83
LOBs
access methods, 16-5
BFILES, 16-2
buffering system, 16-10
external, 16-2
initializing, 16-8
internal, 16-2
locators, 16-3
locators in C, 16-7
temporary, 16-3
Location of Included Files, E-2
location transparency
how provided, 3-15
lock
released by ROLLBACK statement, F-101
LOCK TABLE statement
example of, 3-25
locking tables with, 3-25
NOWAIT parameter in, 3-25
purpose of, 3-25
specifying lock mode in, 3-25
locking, 3-24
definition of, 3-16
explicit versus implicit, 3-24
modes of, 3-16
overriding default, 3-24
privileges needed to obtain, 3-27
table versus row, 3-24
uses for, 3-24
with FOR UPDATE OF, 3-24
with the LOCK TABLE statement, 3-25
logon, 3-2
Logon Data Area, 5-50
LONG datatype, 4-7
LONG RAW datatype, 4-9
LONG VARCHAR
datatype, 4-10
LONG VARRAW datatype, 4-10
LTYPE precompiler option, 10-28
lvalue, 4-11

M

M variable in SQLDA
how value is set, 15-11
purpose of, 15-11
macro precompiler options, 10-5
malloc()
example of using, 15-32
purpose of, 15-32
MAXLITERAL
default value for, 2-15
MAXLITERAL precompiler option, 10-29
MAXOPENCURSORS
precompiler option
effect on performance, C-10
for multiple cursors, 6-13
specifying for separate precompilation, 2-17
what it affects, C-7
MAXOPENCURSORS precompiler option, 10-30
metadata, 18-16
micro precompiler options, 10-5
migration
error message codes, A-6
include files, 5-36
migration from earlier releases, A-6
MODE
precompiler option
effect on OPEN, 6-13
MODE interaction with DBMS, 10-17
MODE precompiler option, 10-31
modes, parameter, 7-3
multithreaded applications
sample program, 11-12
user-interface features
embedded SQL statements and directives, 11-8

N

N variable in SQLDA
how value is set, 15-7
purpose of, 15-7
naming
of cursors, 6-12
of database objects, F-11
of select-list items, 15-5
of SQL*Forms user exits, 20-13
National Language Support (NLS), 4-48
NATIVE
value of DBMS option, 10-16
native interface, 5-54
navigational access sample program, 17-24
nested tables, 18-2
creation, 18-2
Net8
connecting to Oracle via, 3-7
connection syntax, 3-6
for concurrent connections, 3-7
function of, 3-6
network
communicating over, 3-6
protocols, 3-6
reducing traffic, C-4
NIST
compliance, xxxvii
NIST, address of, xxxviii
NLS (National Language Support), 4-48, A-2
NLS parameter
NLS_CURRENCY, 4-48
NLS_DATE_FORMAT, 4-48
NLS_DATE_LANGUAGE, 4-48
NLS_ISO_CURRENCY, 4-48
NLS_LANG, 4-49
NLS_LANGUAGE, 4-48
NLS_NUMERIC_CHARACTERS, 4-48
NLS_SORT, 4-48
NLS_TERRITORY, 4-48
NLS_CHAR precompiler option, 10-32
NLS_LOCAL precompiler option, 10-32
node
current, 3-7
definition of, 3-6
NOT FOUND condition
in the WHENEVER statement, 9-24
meaning of, 9-24
of WHENEVER directive, F-120
notation
conventions, xxxvi
rules for, xxxvi
Notation, BNF, xxxvi
NOWAIT parameter
effect of, 3-25
in LOCK TABLE statements, 3-25
omitting, 3-25
NULLs
definition of, 2-6
detecting, 6-4
handling in dynamic SQL method 4, 15-17
hardcoding, 6-4
inserting, 6-4
restrictions on, 6-5
returning, 6-5
testing for, 6-5
using the sqlnul() function to test for, 15-18
null-terminated strings, 4-7
NUMBER datatype, 4-5
using the sqlprc() function with, 15-16
numeric expressions
cannot serve as host variables, 4-16

O

object cache, 17-4
OBJECT CREATE SQL statement, 17-9, F-84
OBJECT DELETE SQL statement, 17-11, F-85
OBJECT DEREF SQL statement, 17-10, F-86
OBJECT FLUSH SQL statement, F-87
OBJECT FLUSH SQL statements, 17-12
OBJECT GET SQL statement, 17-16, F-88
OBJECT RELEASE SQL statement, F-89
OBJECT SET SQL statement, 17-14, F-90
Object Type Translator (OTT), A-4
command line, 19-6
command line syntax, 19-26
creating types in the database, 19-5
datatype mappings, 19-10
default name mapping, 19-38
outtype file, 19-17
parameters, 19-27 to 19-31
providing an intype file, 19-8
reference, 19-25
restriction, 19-39
using, 19-1, 19-2
using with Pro*C/C++, 19-22
Object Types, A-3
OBJECT UPDATE SQL statement, 17-12, F-91
objects
accessing with OCI, 19-19
introduction to, 17-2
manipulating with OCI, 19-19
persistent, 17-4
persistent versus transient copies of, 17-4
references to, 17-2
support, 17-1
transient, 17-4
types, 17-2
using object types in Pro*C/C++, 17-3
OBJECTS precompiler option, 10-33, 17-20
ocation of the Pro*C/C++ Executable, E-3
OCI applications
using the OTT with, 19-18
OCI calls, 1-8
embedding, 5-50
in an X/A environment, 5-55
OCI onblon() call
not used to connect, 5-50
OCI orlon() call
not used to connect, 5-50
OCI Release 8, 5-45
accessing and manipulating objects, 19-19
embedding in Pro*C/C++, 5-48
interfacing to, 5-46
parameters in the environment handle, 5-46
SQLLIB extensions, 5-45
OCI types
declaring, 17-34
manipulating, 17-35
OCIDate, 17-34
OCINumber, 17-34
OCIRaw, 17-34
OCIString, 17-34
using in embedded SQL, 17-34
OCIDate, 17-34
declaring, 17-34
ocidfn.h, 5-50
OCINumber, 17-34
declaring, 17-34
OCIRaw, 17-34
declaring, 17-34
OCIString, 17-34
declaring, 17-34
ONAME precompiler option, 10-33
usage notes for, 10-34
OPEN CURSOR statement, 14-25
OPEN DESCRIPTOR SQL statement, F-94
OPEN SQL statement, F-92
OPEN statement, 6-13
dependence on precompiler options, 6-13
effect of, 6-13
example of, 6-13
examples, F-94
purpose of, 6-12, 6-13
use in dynamic SQL method 3, 13-20
use in dynamic SQL method 4, 15-30
opening
a cursor variable, 4-27
cursors, F-92, F-94
operators
C versus SQL, 2-15
restrictions on, 2-15
optimization approach, C-5
optimizer hints, C-5
in C, 6-16
in C++, 6-16, 12-4
ORACA, 9-3
example of using, 9-41
using to gather cursor cache statistics, 9-40
ORACA precompiler option, 10-34
ORACAID component, 9-38
Oracle
datatypes, 2-7
Forms Version 4, 20-14
Open Gateway
using the ROWID datatype with, 4-8
Toolset, 20-14
Oracle Call Interface Rel 7, 5-50
Oracle Communications Area, 9-34
ORACLE identifiers
how to form, F-11
OTT parameters
CASE, 19-30
CODE, 19-28
CONFIG, 19-29
ERRTYPE, 19-30
HFILE, 19-29
INITFILE, 19-29
INITFUNC, 19-29
INTYPE, 19-27
OUTTYPE, 19-28
SCHEMA_NAMES, 19-31
USERID, 19-27
where they appear, 19-31
OTT. See Object Type Translator
OUT parameter mode, 7-3
output host variables
assigning values to, 6-2
definition of, 6-2
outtype file, 19-32
when running OTT, 19-17
OUTTYPE OTT parameter, 19-28
overhead
reducing, C-2

P

PAGELEN
precompiler option, 10-35
parameter modes, 7-3
PARSE
precompiler option, 10-35, 12-4
parse
definition of, 13-4
parse error offset
how to interpret, 9-15
use in error reporting, 9-15
parsing dynamic statements
PREPARE statement, F-96
password
defining, 3-2
passwords
changing at runtime, A-2
performance
eliminating extra parsing to improve, C-7
optimizing SQL statements to improve, C-5
reasons for poor, C-2
using embedded PL/SQL to improve, C-3
using HOLD_CURSOR to improve, C-12
using host arrays to improve, C-3
using indexes to improve, C-6
using RELEASE_CURSOR to improve, C-12
using row-level locking to improve, C-6
persistent copies of objects, 17-4
persistent objects, 17-4
PL/SQL, 1-4
anonymous block
used to open a cursor variable, 4-28
cursor FOR loop, 7-3
description of, 1-4
difference from SQL, 1-4
executing a block using the AT clause, 3-10
integration with database server, 7-2
main advantage of, 1-4
packages, 7-4
PL/SQL tables, 7-5
procedures and functions, 7-3
RECORD type
cannot be bound to a C struct, 4-41
relationship with SQL, 1-4
setting SQLCA, 9-22
user-defined records, 7-5
PL/SQL blocks
embedded in precompiler programs, F-51
placeholders
duplicate, 13-14, 13-30
naming, 13-14
proper order of, 13-14
use in dynamic SQL statements, 13-3
pointer
definition of, 4-46
to cursor variables
restrictions on, 4-27
pointer variables
declaring, 4-46
determining size of referenced value, 4-46
referencing, 4-46
referencing struct members with, 4-46
precedence of precompiler options, 10-3
precision
definition of, 15-16
using sqlprc() to extract, 15-16
when not specified, 15-16
precompilation, 10-6
conditional, 2-16
separate, 2-17
precompilation unit, 3-2, 10-7
precompiled header files, 5-36, A-2
C++ restrictions, 5-40
CODE option, 5-40
PARSE option, 5-40
precompiler options
alphabetized list, 10-7, 10-11
AUTO_CONNECT, 10-11
case sensitivity, 10-2
CHAR_MAP, 5-2, 10-12, A-3
CLOSE_ON_COMMIT, 6-15, 10-12
CODE, 10-13
COMP_CHARSET, 10-14
CONFIG, 10-15
configuration files, 10-5
CPP_SUFFIX, 10-15
DBMS, 10-16
DEF_SQLCODE, 10-17
DEFINE, 10-18
determining current value, 10-4
DURATION, 10-20
DYNAMIC, 14-11
entering, 10-9
entering on the command line, 10-9
ERRORS, 10-20
ERRTYPE, 10-21
FIPS, 10-21
HEADER, 10-23
HOLD_CURSOR, 10-23, 10-24
INAME, 10-25
INCLUDE, 10-25
INTYPE, 10-26
LINES, 10-27
list of, 10-11
LNAME, 10-28
LTYPE, 10-28
MAXLITERAL, 2-15, 10-29
MAXOPENCURSORS, 10-30
micro and macro, 10-5
MODE, 10-31, 14-11
NLS_CHAR, 10-32
NLS_LOCAL, 10-32
OBJECTS, 10-33
ONAME, 10-33
ORACA, 10-34
PAGELEN, 10-35
PARSE, 10-35
precedence, 10-3
PREFETCH, 10-36
RELEASE_CURSOR, 10-36
scope, 10-6
scope of, 10-7
SELECT_ERROR, 10-38
specifying, 10-9
SQLCHECK, 10-38, 17-21
syntax for, 10-9
SYS_INCLUDE, 10-39
THREADS, 10-40, 11-8
TYPE_CODE, 10-41, 14-11
UNSAFE_NULL, 10-41
USERID, 10-42
using, 10-11 to 10-44
VARCHAR, 10-42
VERSION, 10-43
predefined symbols, 2-16
preface
Send Us Your Comments, xxix
PREFETCH precompiler option, 10-36, A-5
PREPARE SQL statement, F-96
PREPARE statement, 14-21
effect on data definition statements, 13-5
examples, F-98
use in dynamic SQL, 13-13, 13-19
use in dynamic SQL method 4, 15-25
preprocessor
example, 5-43
EXEC ORACLE directives, 5-42
preprocessor directives
directives not supported by Pro*C, 5-30
preprocessor, support of, 4-2
private SQL area
association with cursors, 2-8
definition of, 2-8
opening of, 2-8
purpose of, C-9
Pro*C/C++ Precompiler
common uses for, 1-3
new database types, 17-35
new features, A-1 to A-6
object support in, 17-1
runtime context, 5-45
support for NLS, 4-49
use of PL/SQL with, 7-6
using OTT with, 19-22
procedural database extension, 7-4
program termination
normal versus abnormal, 3-22
programming guidelines, 2-11

Q

queries
association with cursors, 6-11
forwarding, 3-14
incorrectly coded, 6-8
kinds of, 6-6
requirements for, 6-7
returning more than one row, 6-7
single-row versus multirow, 6-8

R

RAW datatype, 4-9
read consistency
definition of, 3-16
READ ONLY parameter
in SET TRANSACTION statement, 3-23
read-only transactions
description of, 3-23
example of, 3-23
how ended, 3-23
record, 7-5
REF
structure for, 17-33
REF (reference to object), 17-2
REFERENCE clause
in TYPE statement, 5-14
reference semantics (ANSI dynamic SQL), 14-7
references to objects (REFs)
declaring, 17-33
using, 17-33
using in embedded SQL, 17-33
referencing
of host arrays, 8-2, 8-3
REFs
declaring, 17-33
using, 17-33
using in embedded SQL, 17-33
REGISTER CONNECT SQL statement, F-98
RELEASE option, 3-22
if omitted, 3-23
in COMMIT statement, 3-18
in ROLLBACK statement, 3-21
purpose of, 3-18
restriction on, 3-21
RELEASE_CURSOR
precompiler option
what it affects, C-7
RELEASE_CURSOR option
of ORACLE Precompilers, F-18
using to improve performance, C-12
RELEASE_CURSOR precompiler option, 10-36
remote database
declaration of, F-37
reserved namespaces, B-4
reserved words and keywords, B-2
resource manager, 5-54
restrictions
on AT clause, 3-11
on Comments, 13-31
on CURRENT OF clause, 6-17
on declaring cursors, 6-13
on FOR clause, 8-15
on host arrays, 8-4, 8-10, 8-12, 8-13, 8-14
on input host variables, 6-2
on NULLs, 6-5
on separate precompilation, 2-17
on SET TRANSACTION statement, 3-23
use of CURRENT OF clause, 8-4
retrieving rows from a table
embedded SQL, F-104
return codes
user exits, 20-8
returning clause
DELETE, 6-10
in INSERT, 6-11
in UPDATE, 6-10
returning clauses, 6-11
roll back
to a savepoint, F-103
to the same savepoint multiple times, F-101
rollback segment
function of, 3-16
ROLLBACK SQL statement, F-99
ROLLBACK statement, 3-22
effect of, 3-20
ending a transaction, F-101
example of, 3-21
examples, F-102
in error handling routines, 3-21
purpose of, 3-20
RELEASE option in, 3-21
TO SAVEPOINT clause in, 3-20
using in a PL/SQL block, 3-28
where to place, 3-21
rollbacks
automatic, 3-22
function of, 3-16
statement-level, 3-22
row locks
acquiring with FOR UPDATE OF, 3-24
advantage of, C-6
using to improve performance, C-6
when acquired, 3-25
when released, 3-25
ROWID
logical, 4-7, 4-38
pseudocolumn, 3-26
using to mimic CURRENT OF, 3-26, 8-28
pseudocolumns, 4-38
universal, 4-7, 4-38
ROWID datatype, 4-7
rows
fetching from cursors, F-58, F-61
inserting into tables and views, F-68
updating, F-112
rows-processed count
in the SQLCA, 9-21
use in error reporting, 9-15
runtime context
establishing, 5-45
terminating, 5-45
runtime type checking, 17-22

S

S variable in SQLDA
how value is set, 15-10
purpose of, 15-10
sample database tables
DEPT table, 2-18
EMP table, 2-18
sample object type code, 17-24
sample programs
ansidyn1.pc, 14-29
ansidyn2.pc, 14-37
calldemo.sql, with sample9.pc, 7-23
coldemo1.pc, 18-24
cppdemo1.pc, 12-6
cppdemo2.pc, 12-9
cppdemo3.pc, 12-13
cursor variable demos, 4-32
cv_demo.pc, 4-33
cv_demo.sql, 4-32
extp1.pc, 7-31
how to precompile, 2-20
lobdemo1.pc, 16-35
navdemo1.pc, 17-24
oraca.pc, 9-41
sample10.pc, 15-40
sample11.pc, 4-33
sample12.pc, 15-40
sample1.pc, 2-19
sample2.pc, 4-43
sample3.pc, 8-8
sample4.pc, 5-15
sample5.pc, 20-10
sample6.pc, 13-9
sample7.pc, 13-15
sample8.pc, 13-21
sample9.pc, 7-23
sqlvcp.pc, 4-22
SAVEPOINT SQL statement, F-103
SAVEPOINT statement
example of, 3-19
examples, F-103
purpose of, 3-19
savepoints
creating, F-103
definition of, 3-19
uses for, 3-19
when erased, 3-20
Scale
using SQLPRC to extract, F-118
scale
definition of, 15-16, F-118
using sqlprc() to extract, 15-16
when negative, 15-16, F-118
SCHEMA_NAMES OTT parameter, 19-31
usage, 19-36
scope
of a cursor variable, 4-26
of DECLARE STATEMENT directive, F-40
of precompiler options, 10-7
of the EXEC ORACLE statement, 10-10
of WHENEVER statement, 9-28
search condition
definition of, 6-10
in the WHERE clause, 6-10
select descriptor, 13-26, 15-4
definition of, 13-26
information in, 13-26
select list
definition of, 6-8
number of items in, 6-8
using the free() function for, 15-37
using the malloc() function for, 15-32
SELECT SQL statement, F-104
select SQLDA
purpose of, 15-3
SELECT statement, 6-7
clauses available for, 6-8
embedded SQL examples, F-107
example of, 6-7
INTO clause in, 6-8
purpose of, 6-7
testing, 6-8
using host arrays in, 8-5
WHERE clause in, 6-8
SELECT_ERROR
precompiler option, 6-8, 10-38
semantic checking
controlling with the SQLCHECK option, D-2
definition of, D-2
enabling, D-4
with the SQLCHECK option, D-2
Send Us Your Comments
boilerplate, xxix
separate precompilation
guidelines for, 2-17
referencing cursors for, 2-17
restrictions on, 2-17
specifying MAXOPENCURSORS for, 2-17
using a single SQLCA with, 2-18
server
integration with PL/SQL, 7-2
session
definition of, 3-15
sessions
beginning, F-26
SET clause
in UPDATE statements, 6-10
purpose of, 6-10
use of subqueries in, 6-10
SET DESCRIPTOR SQL statement, F-107
SET DESCRIPTOR statement, 14-18
SET TRANSACTION statement
example of, 3-23
purpose of, 3-23
READ ONLY parameter in, 3-23
requirements for, 3-23
restrictions on, 3-23
Size of an Integer and ROWID, E-2
snapshot, 3-16
SQL
benefits of, 1-3
Embedded SQL, 1-3
nature of, 1-3
need for, 1-3
SQL Communications Area, 9-2
SQLCA, 9-16
SQL Descriptor Area
SQLDA, 13-26, 15-4
SQL directives
CONTEXT USE, 11-9, F-33
DECLARE DATABASE, F-37
DECLARE STATEMENT, F-39
DECLARE TABLE, F-40
DECLARE TYPE, F-42
TYPE, F-111
VAR, F-116
WHENEVER, F-119
SQL statements
ALLOCATE, F-12
ALLOCATE DESCRIPTOR TYPE, F-14
CACHE FREE ALL, F-15
CALL, 7-27, F-16
CLOSE, F-18
COMMIT, F-24
concerns when executing, 6-6
CONNECT, F-26
CONTEXT ALLOCATE, F-28
CONTEXT FREE, F-29
CONTEXT OBJECT OPTION GET, F-30
CONTEXT OBJECT OPTION SET, F-31
DEALLOCATE DESCRIPTOR, F-34
DELETE, F-43
DESCRIBE, F-47
DESCRIBE DESCRIPTOR, F-49
ENABLE THREADS, F-50
executable versus directive, 2-3
EXECUTE, F-53
EXECUTE ... END-EXEC, F-51
EXECUTE IMMEDIATE, F-57
FETCH, F-58
FETCH DESCRIPTOR, F-61
for defining and controlling transactions, 3-16
for manipulating a cursor, 6-7, 6-11
for manipulating ORACLE data, 6-7
for querying Oracle data, 6-7
FREE, F-63
INSERT, F-68
LOB APPEND, F-72
LOB ASSIGN, F-73
LOB CLOSE, F-73
LOB COPY, F-74
LOB CREATE, F-74
LOB DESCRIBE, F-75
LOB DISABLE BUFFERING, F-76
LOB ENABLE BUFFERING, F-77
LOB ERASE, F-77
LOB FILE CLOSE, F-78
LOB FILE SET, F-79
LOB FLUSH BUFFER, F-79
LOB FREE TEMPORARY, F-80
LOB LOAD, F-80
LOB OPEN, F-81
LOB READ, F-82
LOB TRIM, F-82
LOB WRITE, F-83
OBJECT CREATE, F-84
OBJECT DELETE, F-85
OBJECT DEREF, F-86
OBJECT FLUSH, F-87
OBJECT GET, F-88
OBJECT RELEASE, F-89
OBJECT SET, F-90
OBJECT UPDATE, F-91
OPEN, F-92
OPEN DESCRIPTOR, F-94
optimizing to improve performance, C-5
PREPARE, F-96
REGISTER CONNECT, F-98
ROLLBACK, F-99
rules for executing, C-5
SAVEPOINT, F-103
SELECT, F-104
SET DESCRIPTOR, F-107
summary of, F-5
types of, 2-3
UPDATE, F-112
SQL*Forms
display error screen in, 20-8
IAP constants in, 20-8
returning values to, 20-8
reverse return code switch in, 20-8
SQL*Net
connecting using Version 2, 3-4
SQL*Plus, 1-3
using to test SELECT statements, 6-8
versus embedded SQL, 1-3
SQL, dynamic, 2-6
SQL_CURSOR, F-12
SQL_SINGLE_RCTX
defined constant, 5-51
definition of, 5-47
SQL92, xxxvi
sqlald() function
example of using, 15-21
purpose of, 15-5
syntax for, 15-5
sqlaldt() function
see SQLSQLDAAlloc, 5-52
SQLCA, 9-2, 9-14
components in, 9-19
components set for a PL/SQL block, 9-22
declaring, 9-16
description of, 9-16
explicit versus implicit checking of, 9-3
including multiple times, 5-34
overview of, 2-9
SQLCABC component in, 9-19
SQLCAID component in, 9-19
sqlcode component in, 9-19
sqlerrd, 9-21
sqlerrd[2] component in, 9-21
sqlerrmc component in, 9-20
sqlerrml component in, 9-20
sqlwarn, 9-22
use in separate precompilations, 2-18
using more than one, 9-16
using with SQL*Net, 9-16
sqlca.h
listing of, 9-17
use of SQLCA_STORAGE_CLASS with, 2-17
SQLCAID component, 9-19
SQLCDAFromResultSetCursor(), 5-52
SQLCDAGetCurrent, 5-52
sqlcdat()
see SQLCDAFromResultSetCursor(), 5-52
SQLCHECK option
restrictions on, D-2
usage notes for, 10-39
what it affects, D-3
SQLCHECK precompiler option, 10-38, 17-21, D-4, D-5
SQLCHECK support for objects, 17-21
sqlclu() function
example of using, 15-37
purpose of, 15-37
syntax for, 15-37
sqlclut() function
see SQLSQLDAFree(), 5-52
SQLCODE
with MODE=ANSI, 10-31
sqlcode
component in SQLCA, 9-3, 9-14
interpreting values of, 9-19
SQLCODE status variable
declaring, 9-13
when declared with the SQLCA, 9-14
when used, 9-14
sqlcpr.h, 9-23
sqlcurt() function
see SQLDAToResultSetCursor(), 5-52
SQLDA
bind versus select, 13-26
C variable in, 15-11
definition of, 13-26
F variable in, 15-10
I variable in, 15-10
information stored in, 13-26
L variable in, 15-8
M variable in, 15-11
N variable in, 15-7
purpose of, 13-26
S variable in, 15-10
struct, contents of, 15-5
structure of, 15-7
T variable in, 15-9
use in dynamic SQL method 4, 15-4
V variable in, 15-8
X variable in, 15-11
Y variable in, 15-11
Z variable in, 15-12
sqlda.h, 15-3
SQLDAToResultSetCursor(), 5-52
SQLEnvGet function in SQLLIB, 5-47
SQLEnvGet(), 5-53
sqlerrd
component, 9-15, 9-21
sqlerrd[2] component, 9-15, 9-21
returns N or rows fetched, 8-7
use with data manipulation statements, 8-6
sqlerrm
component in the SQLCA, 9-3
sqlerrmc component, 9-20
sqlerrml component, 9-20
SQLERROR
WHENEVER directive condition, F-120
SQLERROR condition
in the WHENEVER statement, 9-24
meaning of, 9-24
SQLErrorGetText(), 5-52
SQLExtProcError(), 5-53, 7-31
sqlglm(), 9-23
sqlglm() function, 9-22
example of using, 9-23
parameters of, 9-22
sqlglmt()
see SQLErrorGetText, 5-52
sqlgls() function, 9-31
example of use, 4-22
sample program for, 9-34
see SQLLIB
function SQLStmGetText, 4-22
sqlglst() function
see SQLStmtGetText, 5-52
SQLIEM function
in user exits, 20-8
purpose of, 20-8
syntax for, 20-8
sqlld2() function, 5-55
sqlld2t() function
see SQLLDAGetName, 5-52
SQLLDAGetName, 5-52
sqlldat() function
see SQLCDAGetCurrent, 5-52
SQLLIB
and embedded SQL, 2-5
extensions for OCI interoperability, 5-45
function
SQLCDAFromResultSetCursor, 5-52
function SQLCDAGetCurrent, 5-52
function SQLColumnNullCheck, 5-53
function SQLDAFree, 5-52
function SQLDAToResultSetCursor, 5-52
function SQLEnvGet, 5-47, 5-53
function SQLErrorGetText, 5-52
function SQLExtProcError, 5-53, 7-31
function SQLLDAGetName, 5-52
function SQLNumberPrecV6, 5-53
function SQLNumberPrecV7, 5-53
function SQLRowidGet, 5-53
function SQLStmtGetText(), 5-52
function SQLSvcCtxGet, 5-47, 5-53
function SQLVarcharGetLength, 4-22
new names for functions, A-3
new names for public functions, 5-51
SQLLIB function
SQLSQLDAAlloc, 5-52
SQLVarcharGetLength, 5-53
sqlnul() function
example of using, 15-18
purpose of, 15-18
syntax for, 15-18
use of with T variable, 15-9
sqlnult() function
see SQLColumnNullCheck(), 5-53
SQLNumberPrecV6, 5-53
SQLNumberPrecV7, 5-53
sqlpr2() function, 15-17
sqlpr2t() function
see SQLNumberPrecV7, 5-53
sqlprc() function, 15-16
sqlprct() function
see SQLNumberPrecV6, 5-53
SQLRowidGet(), 5-53
SQLSQLDAAlloc, 5-52
SQLSQLDAFree(), 5-52
SQLSTATE
class codes, 9-4
declaring, 9-4
mapping to Oracle errors, 9-6
predefined classes, 9-5
status codes, 9-6
status variable, 9-2, 9-3
using, 9-13
values, 9-4
with MODE=ANSI, 10-31
SQLStmtGetText, 5-52
SQLSvcCtxGet function in SQLLIB, 5-47
SQLSvcCtxGet(), 5-53
SQLVarcharGetLength, 5-53
sqlvcp() function, see SQLLIB
function SQLVarcharGetLength, 4-22
sqlvcpt() function
see SQLVarcharGetLength, 5-53
sqlwarn
flag, 9-22
SQLWARNING
WHENEVER directive condition, F-120
SQLWARNING condition
in the WHENEVER statement, 9-24
meaning of, 9-24
Standard Header Files, E-2
statement-level rollback
description of, 3-22
to break deadlocks, 3-22
status codes
meaning of, 9-14
status variables, 9-2
STOP action
in the WHENEVER statement, 9-25
of WHENEVER directive, F-120
result of, 9-25
stored procedures
program example, 7-23
stored subprograms
calling, 7-23
creating, 7-21
packaged versus stand-alone, 7-20
stored versus inline, 7-20
STRING datatype, 4-6
string host variables
declaring, 5-8
Struct Component Alignment, E-2
structs
array of, 8-17, A-2
as host variables, 4-39
C, using, 17-32
for collection object types, 18-3
generating C structs for a REF, 17-33
pointers as host variables, 4-47
structs (structures)
cannot be nested, 4-41
structures (structs)
nesting not permitted for host, 4-41
subqueries
definition of, 6-9
example of, 6-9, 6-10
uses for, 6-9
using in the SET clause, 6-10
using in the VALUES clause, 6-9
symbols
definig, 2-16
syntax checking
controlling with the SQLCHECK option, D-2
definition of, D-2
syntax diagram
description of, F-9
how to read, F-9
how to use, F-9
symbols used in, F-9
syntax, embedded SQL, 2-5
SYS_INCLUDE
system header files in C++, 12-5
SYS_INCLUDE precompiler option, 10-39
SYSDBA/SYSOPER Privileges, A-5
System Configuration File, E-3
system configuration file, 10-3
system failure
effect on transactions, 3-17
System Global Area (SGA), 7-20
system header files
specifying the location of, 12-5
system-specific Oracle documentation, xxxii, 1-10, 2-18, 3-7, 5-31, 5-55, 20-1
system-specific reference, 4-6, 10-2, 10-6, 10-26, 10-40

T

T variable in SQLDA
how value is set, 15-9
purpose of, 15-9
table locks
acquiring with LOCK TABLE, 3-25
effect of, 3-25
exclusive, 3-25
row share, 3-25
when released, 3-25
tables
inserting rows into, F-68
nested, 18-2
updating rows in, F-112
terminal
encoding scheme, 4-49
termination, program
normal versus abnormal, 3-22
THREADS
precompiler option, 10-40, 11-8
threads, F-28
allocating context, 11-8, F-28
enabling, 11-8, F-50
freeing context, 11-10, F-29
use context, 11-9
TO clause
of ROLLBACK statement, F-100
TO SAVEPOINT clause
in ROLLBACK statement, 3-20
purpose of, 3-20
restriction on, 3-21
Toolset
Oracle, 20-14
trace facility
function of, C-6
using to improve performance, C-6
transaction processing
overview of, 2-8
statements used for, 2-8
transaction processing monitor, 5-54
transactions
committing, F-24
contents of, 2-8, 3-17
definition of, 2-8
description of, 3-16
distributed, F-102
failure during, 3-17
guarding databases with, 3-16
guidelines for, 3-27
how to begin, 3-17
how to end, 3-17
making permanent, 3-18
read-only, 3-23
rolling back, F-99
subdividing with savepoints, 3-19
terminating, 3-18
undoing, 3-20
undoing parts of, 3-19
when rolled back automatically, 3-17, 3-22
transient copies of objects, 17-4
transient objects, 17-4
truncated values
detecting, 6-4, 7-14
truncation error
when generated, 6-6
tuning, performance, C-2
two-task
linking, 2-18
type checking at runtime, 17-22
TYPE directive
examples, F-112
TYPE SQL directive, F-111
TYPE_CODE
precompiler option, 10-41

U

undo a transaction, F-99
Unicode character set, 5-9
Unicode variables, A-4
unions
cannot be nested in host structures, 4-41
not permitted as host structures, 4-41
Universal ROWID, A-5
UNIX
linking a Pro*C application under, 1-10
UNSAFE_NULL precompiler option, 10-41
UNSIGNED datatype, 4-10
UPDATE CASCADE, 9-21
UPDATE SQL statement, F-112
UPDATE statement
embedded SQL examples, F-116
example of, 6-9
purpose of, 6-9
SET clause in, 6-10
using host arrays in, 8-12
WHERE clause in, 6-10
updating
rows in tables and views, F-112
use
thread context, 11-9, F-33
user configuration file
to set precompiler options, 10-3
User Exits, E-3
user exits
calling from a SQL*Forms trigger, 20-6
common uses for, 20-3
example of, 20-9
guidelines for, 20-13
kinds of statements allowed in, 20-4
linking into IAP, 20-13
meaning of codes returned by, 20-8
naming, 20-13
passing parameters to, 20-7
requirements for variables in, 20-4
running the GENXTB form, 20-12
running the GENXTB utility for, 20-13
steps in developing, 20-3
use of IAF GET statements in, 20-5
use of IAF PUT statements in, 20-6
use of WHENEVER statement in, 20-9
user session
definition of, 3-15
user-defined record, 7-5
user-defined stored function
used in WHERE clause, 6-10
user-defined type equivalencing, F-111
USERID option
when required, 10-42
USERID OTT parameter, 19-27
USERID precompiler option, 10-42
using with the SQLCHECK option, D-4
usernames
defining, 3-2
using C structures, 17-32
USING clause
in CONNECT statement, 3-9
in the EXECUTE statement, 13-14
of FETCH statement, F-59
of OPEN statement, F-93
purpose of, 13-14
using indicator variables in, 13-14
using collection types, 17-33
using dbstring
Net8 database id specification, F-27
Using REFs in Embedded SQL, 17-33

V

V variable in SQLDA
how value is set, 15-8
purpose of, 15-8
V7
value of DBMS option, 10-16
VALUES clause
in INSERT statements, 6-9
kinds of values allowed in, 6-9
of embedded SQL INSERT statement, F-71
of INSERT statement, F-71
purpose of, 6-9
requirements for, 6-9
use of subqueries in, 6-9
VAR directive
examples, F-119
VAR SQL directive, F-116
VAR statement
syntax for, 5-13, 5-14
VARCHAR
arrays of, 8-2
VARCHAR datatype, 4-7
VARCHAR precompiler option, 10-42
VARCHAR pseudotype
requirements for using with PL/SQL, 7-11
VARCHAR variables
advantages of, 4-19
declaring, 4-18
length member in, 4-19
must be passed to a function by reference, 4-21
specifying the length of, 4-19
structure of, 4-18
using macros to define length of, 5-29
versus character arrays, 5-9
VARCHAR2 datatype, 4-4, 5-15
variables, 2-6
cursor, 4-26
host, 18-4
indicator, 18-4
VARNUM datatype, 4-7
VARRAW datatype, 4-9
VARRAYs
creation, 18-3
varying length arrays, 18-3
VERSION precompiler option, 10-43, 17-19
vertical bar, xxxvi
views
inserting rows into, F-68
updating rows in, F-112
VMS
linking a precompiler application, 1-10

W

warning flags
use in error reporting, 9-15
WHENEVER directive
examples, F-121
WHENEVER SQL directive, F-119
WHENEVER statement
automatic checking of SQLCA with, 9-24
CONTINUE action in, 9-25
DO action in, 9-25
DO BREAK action in, 9-25
DO CONTINUE action in, 9-25
examples of, 9-26
GOTO action in, 9-25
guidelines for, 9-29
maintaining addressability for, 9-30
new actions, A-3
NOT FOUND condition in, 9-24
overview of, 2-9
scope of, 9-28
SQLERROR condition in, 9-24
SQLWARNING condition in, 9-24
STOP action in, 9-25
use in user exits, 20-9
using to avoid infinite loops, 9-29
using to handle end-of-data conditions, 9-29
where to place, 9-29
WHERE clause
host arrays in, 8-16
if omitted, 6-11
in DELETE statements, 6-10
in SELECT statements, 6-8
in UPDATE statements, 6-10
of DELETE statement, F-45
of UPDATE statement, F-114
purpose of, 6-10
search condition in, 6-10
WHERE CURRENT OF clause
CURRENT OF clause, 6-17
WORK option
of COMMIT statement, F-25
of ROLLBACK statement, F-100

X

X variable in SQLDA
how value is set, 15-11
purpose of, 15-11
X/Open, 5-54
application development, 5-54
XA interface, 5-54

Y

Y variable in SQLDA
how value is set, 15-11
purpose of, 15-11

Z

Z variable in SQLDA
how value is set, 15-12
purpose of, 15-12


Prev
Oracle
Copyright © 1999 Oracle Corporation.

All Rights Reserved.

Library

Product

Contents