Oracle8i JDBC Developer's Guide and Reference
Release 3 (8.1.7)

Part Number A83724-01

Library

Solution Area

Contents

Go to previous page

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 


Symbols

$, 15-9

A

absolute positioning in result sets, 12-2
absolute() method (result set), 12-14
ACID properties, 17-2
addBatch() method, 13-11
addConnectionEventListener() method (connection cache), 15-21
afterLast() method (result sets), 12-14
ANO (Oracle Advanced Security), 18-8
APPLET HTML tag, 18-24
applets
connecting to a database, 18-15
deploying in an HTML page, 18-24
packaging, 18-23
for JDK 1.2.x or 1.1.x browser, 18-23
packaging and deploying, 1-11
signed applets
browser security, 18-19
object-signing certificate, 18-20
using signed applets, 18-19
using with firewalls, 18-20
working with, 18-15
ARCHIVE, parameter for APPLET tag, 18-25
ARRAY
class, 6-12
descriptors, 6-12
objects, creating, 6-12, 10-12
array descriptor
creating, 10-20
ArrayDescriptor object, 10-11, 10-20
creating, 10-12
deserialization, 10-14
get methods, 10-13
serialization, 10-14
setConnection() method, 10-14
arrays
defined, 10-2
example program, 20-34
getting, 10-18
named, 10-2
passing to callable statement, 10-20
retrieving from a result set, 10-14
retrieving partial arrays, 10-17
using type maps, 10-22
working with, 10-2
ASO (Oracle Advanced Security), 18-8
authentication (security), 18-9
AUTHENTICATION_LEVEL parameter, 18-18
auto-commit mode
disabling, 19-6
result set behavior, 19-6

B

batch updates--see update batching
batch value
checking value, 13-7
connection batch value, setting, 13-5
connection vs. statement value, 13-4
default value, 13-5
overriding value, 13-7
statement batch value, setting, 13-6
BatchUpdateException, 13-17
beforeFirst() method (result sets), 12-13
begin method, 17-3, 17-10, 17-13
BFILE
accessing data, 7-21
class, 6-12
creating and populating columns, 7-19
defined, 3-28
example program, 20-39
introduction, 7-2
locators, 7-16
getting from a result set, 7-16
getting from callable statement, 7-17
passing to callable statements, 7-17
passing to prepared statements, 7-17
manipulating data, 7-21
reading data, 7-18
BFILE locator, selecting, 6-12
BigDecimal mapping (for attributes), 8-31
bindds command, 15-9, 17-8, 17-17
example, 15-10
options, 15-9
bindut command, 17-16
using, 17-9, 17-10
BLOB, 7-5
class, 6-12
creating and populating, 7-10
creating columns, 7-11
getting locators, 7-3
introduction, 7-2
locators
getting from result set, 7-4
selecting, 6-12
manipulating data, 7-12
populating columns, 7-11
reading data, 7-6, 7-8
writing data, 7-9
Boolean parameters, restrictions, 19-9
branch qualifier (distributed transactions), 16-13

C

cache schemes (connection cache), 15-26
caching, client-side
custom use for scrollable result sets, 12-6
Oracle use for scrollable result sets, 12-5
callable statement
getting a BFILE locator, 7-17
getting LOB locators, 7-4
passing BFILE locator, 7-17
passing LOB locators, 7-5
using getOracleObject() method, 5-5
cancelRowUpdates() method (result set), 12-20
casting return values, 5-10
catalog arguments (DatabaseMetaData), 21-16
CHAR
object, creating, 6-13
CHAR class, 6-13
conversions with KPRB driver, 18-33
CHAR columns
NLS size restrictions, Thin, 18-6
space padding, 19-8
using setFixedCHAR() to match in WHERE, 5-17
character sets, 6-15
conversions with KPRB driver, 18-33
checksums
code example, 18-13
setting parameters in Java, 18-13
support by OCI drivers, 18-11
support by Thin driver, 18-12
Class.forName method, 3-3
CLASSPATH, specifying, 2-5
clearBatch() method, 13-14
clearDefines() method, 13-24
clearMetaData parameter, 14-6
client installation, 1-10
CLOB
class, 6-12
creating and populating, 7-10
creating columns, 7-11
introduction, 7-2
locators, 7-3
getting from result set, 7-4
passing to callable statements, 7-5
passing to prepared statement, 7-5
locators, selecting, 6-12
manipulating data, 7-12
populating columns, 7-11
reading data, 7-6, 7-8
writing data, 7-9
close(), 14-5
close() method, 6-19, 6-20, 19-8
for caching statements, 14-7, 14-9
for OracleConnectionCache interface, 15-23
closeFile() method, 7-22
closePooledConnection() method, 15-23
closeWithKey(), 14-5
closeWithKey() method, 14-10
CMAN.ORA file, creating, 18-18
CODE, parameter for APPLET tag, 18-24
CODEBASE, parameter for APPLET tag, 18-24
collections
defined, 10-2
collections (nested tables and arrays), 10-11
column types
defining, 13-23
redefining, 13-20
commit a distributed transaction branch, 16-12
commit changes to database, 3-13
commit method, 17-3, 17-11, 17-14
CONCUR_READ_ONLY result sets, 12-9
CONCUR_UPDATABLE result sets, 12-9
concurrency types in result sets, 12-4
connect string
for KPRB driver, 18-28
for the Oracle8 Connection Manager, 18-18
connection
closing, 3-14
from KPRB driver, 1-12
opening, 3-3
opening for JDBC OCI driver, 3-9
opening for JDBC Thin driver, 3-10
Properties object, 3-6
connection caching
adding connection event listener, 15-21
basics, accessing the cache, 15-18
basics, closing connections, 15-19
basics, opening connections, 15-18
basics, setting up a cache, 15-17
cache instance getConnection() method, 15-18
connection events, 15-19
creating connection event listener, 15-21
implementation scenarios, 15-19
OracleConnectionCache interface, 15-23
OracleConnectionCacheImpl class, 15-24
OracleConnectionEventListener class, 15-27
overview, 15-17
preliminary steps, 15-20
removing connection event listener, 15-22
steps in closing a connection, 15-22
steps in opening a connection, 15-20
connection event listener, 15-21
Connection Manager, 1-10, 18-16, 18-17
installing, 18-17
starting, 18-18
using multiple managers, 18-19
writing the connect string, 18-18
connection methods, JDBC 2.0 result sets, 12-32
connection pooling
concepts, 15-12
creating data source and connecting, 15-15
introduction, 15-12
Oracle data source implementation, 15-13
pooled connections, 15-14
sample application, 20-88
standard data source interface, 15-13
connection properties
database, 3-7
defaultBatchValue, 3-7
defaultRowPrefetch, 3-7
includeSynonyms, 3-7
internal_logon, 3-7
sysdba, 3-7
sysoper, 3-7
password, 3-6
put() method, 3-9
remarksReporting, 3-7
user, 3-6
connectionClosed() method (connection event listener), 15-28
connectionErrorOccurred() method (connection event listener), 15-28
connections
read-only, 19-14
constants for SQL types, 6-21
CREATE DIRECTORY statement
for BFILEs, 7-19
CREATE TABLE statement
to create BFILE columns, 7-19
to create BLOB, CLOB columns, 7-10
create() method
for CustomDatumFactory interface, 8-21
createDescriptor() method, 8-5, 10-13
createStatement(), 14-5
createStatement() method, 6-17, 14-10
createStatementWithKey(), 14-5
createStatementWithKey() method, 14-10, 14-11
creationState() method, 14-7
code example, 14-7
CursorName
limitations, 21-15
cursors, 19-8
custom collection classes
and JPublisher, 10-24
defined, 10-2, 10-24
custom Java classes
creating, 20-42, 20-46
defined, 8-2
custom object classes
creating, 8-10
defined, 8-2
custom reference classes
and JPublisher, 9-10
defined, 9-2, 9-10
CustomDatum interface, 6-4
additional uses, 8-26
advantages, 8-10
example program, 20-46
reading data, 8-24
writing data, 8-25

D

data conversions, 5-2
LONG, 3-20
LONG RAW, 3-20
data sources
creating and connecting (with JNDI), 15-7
creating and connecting (without JNDI), 15-6
logging and tracing, 15-11
Oracle implementation, 15-3
PrintWriter, 15-11
properties, 15-4
sample application (with JNDI), 20-84
sample application (without JNDI), 20-85
standard interface, 15-3
data streaming
avoiding, 3-24
example program, 20-18
database
connecting
from an applet, 18-15
via multiple Connection Managers, 18-19
with server-side internal driver, 18-26
connection testing, 2-7
database connection
connection property, 3-7
database meta data methods, JDBC 2.0 result sets, 12-35
database URL
including userid and password, 3-5
database URL, specifying, 3-5
DatabaseMetaData calls, 21-16
DatabaseMetaData class, 21-11
entry points for applets, 18-23
DataSource
binding in namespace, 17-8
create dynamically, 17-17
DataSource object
binding in namespace, 17-8, 17-10, 17-13
datatype classes, 6-7
datatype mappings, 3-16
datatypes
Java, 3-16
Java native, 3-16
JDBC, 3-16
Oracle SQL, 3-16
DATE class, 6-15
DBMS_LOB package, 7-6
debugging JDBC programs, 19-11
DEFAULT_CHARSET character set value, 6-14
defaultBatchValue connection property, 3-7
defaultConnection() method, 18-26
defaultRowPrefetch connection property, 3-7
defineColumnType() method, 3-24, 6-19, 13-24
DELETE in a result set, 12-18
deleteRow() method (result set), 12-18
deletesAreDetected() method (database meta data), 12-29
deserialization
ArrayDescriptor object, 10-14
creating a StructDescriptor object, 8-6
creating an ArrayDescriptor object, 10-14
definition of, 8-6, 10-14
StructDescriptor object, 8-6
distributed transaction ID component, 16-13
distributed transactions
branch qualifier, 16-13
check for same resource manager, 16-13
commit a transaction branch, 16-12
components and scenarios, 16-2
concepts, 16-3
distributed transaction ID component, 16-13
end a transaction branch, 16-10
example of implementation, 16-18
global transaction identifier, 16-13
ID format identifier, 16-13
introduction, 16-2
Oracle XA connection implementation, 16-7
Oracle XA data source implementation, 16-6
Oracle XA ID implementation, 16-13
Oracle XA optimizations, 16-17
Oracle XA resource implementation, 16-8
prepare a transaction branch, 16-11
roll back a transaction branch, 16-12
sample application (suspend/resume), 20-93
sample application (two-phase commit), 20-1, 20-98
start a transaction branch, 16-10
transaction branch ID component, 16-13
XA connection interface, 16-7
XA data source interface, 16-6
XA error handling, 16-16
XA exception classes, 16-15
XA ID interface, 16-13
XA resource functionality, 16-9
XA resource interface, 16-8
DriverManager class, 3-3
dynamic SQL, 1-2
DYNAMIC_SCHEME (connection cache), 15-27

E

encryption
code example, 18-13
overview, 18-10
setting parameters in Java, 18-13
support by OCI drivers, 18-11
support by Thin driver, 18-12
end a distributed transaction branch, 16-10
environment variables
specifying, 2-5
errors
general JDBC message structure, A-2
general JDBC messages, listed, A-3
processing exceptions, 3-33
TTC messages, listed, A-11
exceptions
printing stack trace, 3-34
retrieving error code, 3-33
retrieving message, 3-33
retrieving SQL state, 3-33
executeBatch() method, 13-13
executeQuery() method, 6-18
executeUpdate() method, 13-9
explicit statement caching, 14-2, 20-81
definition of, 14-4
null data, 14-11
extensions to JDBC, Oracle, 5-1, 6-1, 8-1, 9-1, 10-1, 13-1
external changes (result set)
defined, 12-27
seeing, 12-28
visibility vs. detection, 12-29
external file
defined, 3-28

F

fetch direction in result sets, 12-17
fetch size, result sets, 12-24
finalizer methods, 19-8
firewalls
configuring for applets, 18-21
connect string, 18-22
described, 18-20
required rule list items, 18-21
using with applets, 1-11, 18-20
first() method (result sets), 12-14
FIXED_RETURN_NULL_SCHEME (connection cache), 15-27
FIXED_WAIT_SCHEME (connection cache), 15-27
floating-point compliance, 21-16
format identifier, transaction ID, 16-13
forward-only result sets, 12-3
function call syntax, SQL92 syntax, 21-13

G

getActiveSize() method (connection cache), 15-27
getARRAY() method, 10-14
getArray() method, 10-6, 10-10, 10-15
using type maps, 10-17
getArrayType() method, 10-13
getAsciiOutputStream() method, 7-14
for writing CLOB data, 7-7
getAsciiStream() method, 7-14
for reading CLOB data, 7-7
getAttributes() method, 8-3
used by Structs, 8-15
getAutoBuffering() method
of the oracle.sql.ARRAY class, 10-9
of the oracle.sql.STRUCT class, 8-9
getBaseName() method, 10-13
getBaseType() method, 10-6, 10-13, 10-18
getBaseTypeName() method, 9-4, 10-6
getBinaryOutputStream() method, 7-13
for writing BLOB data, 7-7
getBinaryStream() method, 3-22, 7-13, 7-22
for reading BFILE data, 7-18
for reading BLOB data, 7-6
getBufferSize() method, 7-13, 7-14
getBytes() method, 3-23, 6-10, 7-13, 7-22
getCacheSize() method (connection cache), 15-27
getCharacterOutputStream() method, 7-14
for writing CLOB data, 7-7
getCharacterStream() method, 7-14
for reading CLOB data, 7-7
getChars() method, 7-14
getChunkSize() method, 7-13, 7-14
getColumnCount() method, 6-21
getColumnName() method, 6-21
getColumns() method, 13-26
getColumnType() method, 5-19, 6-21
getColumnTypeName() method, 5-19, 6-21
getConcurrency() method (result set), 12-12
getConnection() method, 3-4, 8-4, 10-6, 10-13, 18-26
getCursor() method, 6-28, 6-29
getCursorName() method
limitations, 21-15
getCustomDatum() method, 8-22, 8-24
getDefaultExecuteBatch() method, 6-18, 13-7
getDefaultRowPrefetch() method, 6-18, 13-21
getDescriptor() method, 8-4, 10-6
getDirAlias() method, 7-21, 7-22
getErrorCode() method (SQLException), 3-33
getExecuteBatch() method, 6-19, 13-6, 13-7
getFetchSize() method, 12-24
getMaxLength() method, 10-13
getMessage() method (SQLException), 3-33
getName() method, 7-21, 7-22
getNumericFunctions() method, 21-11
getObject() method
casting return values, 5-10
for CustomDatum objects, 8-22
for object references, 9-6
for SQLInput streams, 8-16
for SQLOutput streams, 8-17
for Struct objects, 8-7
return types, 5-4, 5-6
to get BFILE locators, 7-16
to get Oracle objects, 8-8
used with CustomDatum interface, 8-24
getOracleArray() method, 10-6, 10-15, 10-18
getOracleAttributes() method, 8-4, 8-8
getOracleObject() method, 6-20, 6-21
casting return values, 5-10
return types, 5-4, 5-6
using in callable statement, 5-5
using in result set, 5-5
getOraclePlsqlIndexTable() method, 11-2, 11-7, 11-8
argument
int paramIndex, 11-8
code example, 11-8
getPlsqlIndexTable() method, 11-2, 11-7, 11-9
arguments
Class primitiveType, 11-9
int paramIndex, 11-9
code example, 11-8, 11-10
getProcedureColumns() method, 13-26
getProcedures() method, 13-26
getREF() method, 9-7
getRemarksReporting() method, 6-18
getResultSet() method, 6-19, 10-6
getRow() method (result set), 12-15
getRowPrefetch() method, 6-19, 13-21
getSQLState() method (SQLException), 3-33
getSQLTypeName() method, 8-3, 10-6, 10-18
getStmtCacheSize() method
code example, 14-7
getString() method, 6-14
to get ROWIDs, 6-26
getStringFunctions() method, 21-11
getStringWithReplacement() method, 6-15
getSTRUCT() method, 8-7
getSubString() method, 7-15
for reading CLOB data, 7-7
getSystemFunctions() method, 21-11
getTableName() method, 6-21
getTimeDateFunctions() method, 21-11
getTransactionIsolation() method, 6-18, 19-14
getType() method (result set), 12-12
getTypeMap() method, 6-18, 8-13
getUpdateCounts() method (BatchUpdateException), 13-17
getValue() method, 9-5
for object references, 9-6
getXXX() methods
casting return values, 5-10
for specific datatypes, 5-7
global transaction identifier (distributed transactions), 16-13
global transactions, 16-2

H

HEIGHT, parameter for APPLET tag, 18-24
HTML tags, to deploy applets, 18-24
HTTP protocol, 1-7

I

IEEE 754 floating-point compliance, 21-16
implicit statement caching, 14-2
code example, 20-78
concept graphic, 14-3
definition of, 14-2
Least Recently Used (LRU) scheme, 14-4
IN OUT parameter mode, 11-4, 11-6
code example, 20-10
IN parameter mode, 11-4
code example, 20-10
includeSynonyms connection property, 3-7
INSERT in a result set, 12-21
INSERT INTO statement
for creating BFILE columns, 7-20
insertRow() method (result set), 12-22
insertsAreDetected() method (database meta data), 12-29
installation
client, 1-10
directories and files, 2-4
verifying on the client, 2-4
integrity
code example, 18-13
overview, 18-10
setting parameters in Java, 18-13
support by OCI drivers, 18-11
support by Thin driver, 18-12
internal changes (result set)
defined, 12-27
seeing, 12-27
internal_logon connection property, 3-7
sysdba, 3-7
sysoper, 3-7
isAfterLast() method (result set), 12-15
isBeforeFirst() method (result set), 12-15
isFileOpen() method, 7-23
isFirst() method (result set), 12-15
isLast() method (result set), 12-15
isSameRM() (distributed transactions), 16-13

J

Java
compiling and running, 2-6
datatypes, 3-16
native datatypes, 3-16
stored procedures, 3-32
stream data, 3-19
Java Naming and Directory Interface (JNDI), 15-2
Java Sockets, 1-7
java.math, Java math packages, 3-2
java.sql, JDBC packages, 3-2
java.sql.SQLException() method, 3-33
java.sql.Types class, 13-24
java.util.Dictionary class
used by type maps, 8-12
java.util.Map class, 10-18
JDBC
and IDEs, 1-14
and Oracle Application Server, 1-14
basic program, 3-2
datatypes, 3-16
defined, 1-2
guidelines for using, 1-4
importing packages, 3-2
limitations of Oracle extensions, 21-15
sample files, 2-6
testing, 2-7
JDBC 2.0 support
datatype support, 4-3
extended feature support, 4-5
introduction, 4-2
JDK 1.2.x vs. JDK 1.1.x, 4-3
overview of features, 4-7
standard feature support, 4-4
JDBC drivers
and NLS, 18-3
applets, 1-10
applications, 1-10
choosing a driver for your needs, 1-9
common features, 1-6
common problems, 19-8
compatibilities, 2-2
determining driver version, 2-7
introduction, 1-5
registering, 3-3
requirements, 2-2
restrictions, 19-9
SQL92 syntax, 21-9
JDBC mapping (for attributes), 8-30
JdbcCheckup program, 2-7
JDeveloper, 1-14
JDK
migration from 1.1.x to 1.2.x, 4-5
versions supported, 1-13
JNDI
looking up data source, 15-10
overview of Oracle support, 15-2
registering data source, 15-8
JPublisher utility, 6-4, 8-10
creating custom collection classes, 10-24
creating custom Java classes, 8-29
creating custom reference classes, 9-10
SQL type categories and mapping options, 8-30
type mapping modes and settings, 8-30
type mappings, 8-29
JTA
client-side demarcation, 17-3
designating two-phase commit engine, 17-15
enlisting resources, 17-3, 17-7
limitations, 17-7
nested transactions, 17-7
overview, 17-2
specification web site, 17-1
two-phase commit, 17-8
overview, 17-5

K

KPRB driver
connection string for, 18-28
described, 1-8, 18-26
NLS considerations, 18-4
relation to the SQL engine, 18-26
session context, 18-30
testing, 18-30
transaction context, 18-30

L

last() method (result set), 12-14
LD_LIBRARY_PATH variable, specifying, 2-6
Least Recently Used (LRU) scheme, 14-4
length() method, 7-14, 7-22, 10-6
LIKE escape characters, SQL92 syntax, 21-12
limitations on setBytes() and setString(), use of streams to avoid, 3-30
LOB
defined, 3-27
introduction, 7-2
locators, 7-2
reading data, 7-6
LOB locators
getting from callable statements, 7-4
passing, 7-5
LOBs
empty, 7-15
example program, 20-25
locators
getting for BFILEs, 7-16
getting for BLOBs, 7-3
getting for CLOBs, 7-3
LOB, 7-2
passing to callable statements, 7-5
passing to prepared statement, 7-5
logging with a data source, 15-11
logical connection instance, 15-12
LONG
data conversions, 3-20
LONG RAW
data conversions, 3-20
LRU scheme, 14-4

M

memory leaks, 19-8
migration from JDK 1.1.x to 1.2.x, 4-5
moveToCurrentRow() method (result set), 12-21
moveToInsertRow() method (result set), 12-21
mutable arrays, 10-24

N

named arrays, 10-2
defined, 10-11
National Language Support (NLS), 6-15
Net8
name-value pair, 3-4
protocol, 1-7
network events, trapping, 19-11
next() method (result set), 12-15
NLS
and JDBC drivers, 18-3
conversions, 18-3
for JDBC OCI drivers, 18-3
for JDBC Thin drivers, 18-4
for KPRB driver, 18-4
Java methods that employ, 18-2
Thin driver CHAR/VARCHAR2 size restrictions, 18-6
using, 18-2
NLS_LANG environment variable, 18-3
NULL data
converting, 5-2
null data
explicit statement caching, 14-11
NUMBER class, 6-15

O

object references
accessing object values, 9-7, 9-9
described, 9-2
passing to prepared statements, 9-8
retrieving, 9-6
retrieving from callable statement, 9-7
updating object values, 9-7, 9-9
object-JDBC mapping (for attributes), 8-30
OCI driver
applications, 1-10
NLS considerations, 18-3
OCI drivers
described, 1-8
openFile() method, 7-22
optimization, performance, 19-6
Oracle Advanced Security
support by JDBC, 18-8
support by OCI drivers, 18-8
support by Thin driver, 18-9
Oracle Application Server, 1-14
Oracle datatypes
using, 5-1
Oracle extensions
datatype support, 6-3
limitations, 21-15
catalog arguments to DatabaseMetaData calls, 21-16
CursorName, 21-15
IEEE 754 floating-point compliance, 21-16
PL/SQL TABLE, BOOLEAN, RECORD types, 21-15
read-only connection, 19-14
SQL92 outer join escapes, 21-15
SQLWarning class, 21-16
object support, 6-4
packages, 6-2
result sets, 5-3
schema naming support, 6-5
statements, 5-3
support under 8.0.x/7.3.x drivers, 6-29
to JDBC, 5-1, 6-1, 8-1, 9-1, 10-1, 13-1
Oracle mapping (for attributes), 8-30
Oracle objects
and JDBC, 8-2
converting with CustomDatum interface, 8-21
converting with SQLData interface, 8-15
getting with getObject() method, 8-8
Java classes which support, 8-3
mapping to custom object classes, 8-10
reading data by using SQLData interface, 8-17
working with, 8-2
writing data by using SQLData interface, 8-20
Oracle SQL datatypes, 3-16
Oracle8 Connection Manager, 18-16
OracleCallableStatement class, 6-20
getOraclePlsqlIndexTable() method, 11-2
getPlsqlIndexTable() method, 11-2
getXXX() methods, 5-7
registerIndexTableOutParameter() method, 11-2, 11-6
registerOutParameter() method, 5-13
setPlsqlIndexTable() method, 11-2, 11-4
OracleCallableStatement object, 14-3, 14-4
OracleConnection class, 6-17
OracleConnection object, 14-2
OracleConnectionCache interface, 15-23
close() method, 15-23
closePooledConnection() method, 15-23
reusePooledConnection() method, 15-23
OracleConnectionCacheImpl class, 15-24, 15-26
getActiveSize() method, 15-27
getCacheSize() method, 15-27
instantiating and setting properties, 15-24
schemes for new pooled connections, 15-26
setCacheScheme() method, 15-26
setConnectionPoolDataSource() method, 15-25
setMaxLimit() method
setMaxLimit() method (connection cache), 15-26
setting maximum pooled connections, 15-26
OracleConnectionEventListener
connectionClosed() method, 15-28
OracleConnectionEventListener class, 15-27
connectionErrorOccurred() method, 15-28
instantiating, 15-27
setDataSource() method, 15-28
OracleConnectionPoolDataSouorce class, 15-13
OracleDatabaseMetaData class, 21-11
and applets, 18-23
OracleDataSource class, 15-3
OracleDriver class, 6-17
oracle.jdbc2 package, described, 6-24
oracle.jdbc2.Struct class, 6-10
getAttributes() method, 8-3
getSQLTypeName() method, 8-3
oracle.jdbc.driver package, 6-16
oracle.jdbc.driver, Oracle JDBC extensions, 3-3
oracle.jdbc.driver.OracleCallableStatement class, 6-20
close() method, 6-20
getOracleObject() method, 6-20
getXXX() methods, 6-20
registerOutParameter() method, 6-20
setNull() method, 6-20
setOracleObject() methods, 6-20
setXXX() methods, 6-20
oracle.jdbc.driver.OracleConnection class, 6-17
createStatement() method, 6-17
getDefaultExecuteBatch() method, 6-18
getDefaultRowPrefetch() method, 6-18
getRemarksReporting() method, 6-18
getTransactionIsolation() method, 6-18, 19-14
getTypeMap() method, 6-18
prepareCall() method, 6-18
prepareStatement() method, 6-17
setDefaultExecuteBatch() method, 6-18
setDefaultRowPrefetch() method, 6-18
setRemarksReporting() method, 6-18
setTransactionIsolation() method, 6-18, 19-14
setTypeMap() method, 6-18
oracle.jdbc.driver.OracleDriver class, 6-17
oracle.jdbc.driver.OraclePreparedStatement class, 6-19
close() method, 6-19
getExecuteBatch() method, 6-19
setCustomDatum() method, 6-19
setExecuteBatch() method, 6-19
setNull() method, 6-19
setOracleObject() method, 6-19
setXXX() methods, 6-19
oracle.jdbc.driver.OracleResultSet class, 6-21
getOracleObject() method, 6-21
getXXX() methods, 6-21
oracle.jdbc.driver.OracleResultSetMetaData class, 5-19, 6-21
getColumnCount() method, 6-21
getColumnName() method, 6-21
getColumnType() method, 6-21
getColumnTypeName() method, 6-21
getTableName() method, 6-21
using, 5-19
oracle.jdbc.driver.OracleStatement class, 6-18
close() method, 6-19
defineColumnType(), 6-19
executeQuery() method, 6-18
getResultSet() method, 6-19
getRowPrefetch() method, 6-19
setRowPrefetch() method, 6-19
oracle.jdbc.driver.OracleTypes class, 6-21, 13-24
oracle.jdbc.pool package, 15-15
oracle.jdbc.xa package and subpackages, 16-5
OracleJTADataSource class, 17-17
OraclePooledConnection class, 15-14
OraclePooledConnection method
definitions, 15-15
OraclePooledConnection object, 14-2
OraclePreparedStatement class, 6-19
getOraclePlsqlIndexTable() method, 11-2
getPlsqlIndexTable() method, 11-2
registerIndexTableOutParameter() method, 11-2
setPlsqlIndexTable() method, 11-2, 11-4
OraclePreparedStatement object, 14-3, 14-4
OracleResultSet class, 6-21
getXXX() methods, 5-7
OracleResultSetCache interface, 12-6
OracleResultSetMetaData class, 6-21
OracleServerDriver class
defaultConnection() method, 18-27
oracle.sql datatype classes, 6-7
oracle.sql package
data conversions, 5-2
described, 6-7
oracle.sql.ARRAY class, 10-2
and nested tables, 6-12
and VARRAYs, 6-12
createDescriptor() method, 10-13
getArray() method, 10-6
getArrayType() method, 10-13
getAutoBuffering() method, 10-9
getBaseType() method, 10-6
getBaseTypeName() method, 10-6
getConnection() method, 10-6, 10-13
getDescriptor() method, 10-6
getMaxLength() method, 10-13
getOracleArray() method, 10-6
getResultSet() method, 10-6
getSQLTypeName() method, 10-6
length() method, 10-6
methods for Java primitive types, 10-8
setAutoBuffering() method, 10-9
setAutoIndexing() method, 10-10
oracle.sql.ArrayDescriptor class
getBaseName() method, 10-13
getBaseType() method, 10-13
oracle.sql.BFILE class, 6-12
closeFile() method, 7-22
getBinaryStream() method, 7-22
getBytes() method, 7-22
getDirAlias() method, 7-22
getName() method, 7-22
isFileOpen() method, 7-23
length() method, 7-22
openFile() method, 7-22
position() method, 7-23
oracle.sql.BLOB class, 6-12
getBinaryOutputStream() method, 7-13
getBinaryStream() method, 7-13
getBufferSize() method, 7-13
getBytes() method, 7-13
getChunkSize() method, 7-13
length() method, 7-14
position() method, 7-14
putBytes() method, 7-14
oracle.sql.CHAR class, 6-13, 18-33
getString() method, 6-14
getStringWithReplacement() method, 6-15
toString() method, 6-15
oracle.sql.CharacterSet class, 6-13
oracle.sql.CLOB class, 6-12
getAsciiOutputStream() method, 7-14
getAsciiStream() method, 7-14
getBufferSize() method, 7-14
getCharacterOutputStream() method, 7-14
getCharacterStream() method, 7-14
getChars() method, 7-14
getChunkSize() method, 7-14
getSubString() method, 7-15
length() method, 7-14
position() method, 7-14
putChars() method, 7-15
putString() method, 7-15
supported character sets, 7-13
oracle.sql.CustomDatum interface, 8-21
oracle.sql.CustomDatumFactory interface, 8-21
oracle.sql.datatypes
support, 6-9
oracle.sql.DATE class, 6-15
oracle.sql.Datum array, 11-8
oracle.sql.Datum class, described, 6-7
oracle.sql.NUMBER class, 6-15
OracleSql.parse() method, 21-13
oracle.sql.RAW class, 6-15
oracle.sql.REF class, 6-11, 9-2
getBaseTypeName() method, 9-4
getValue() method, 9-5
setValue() method, 9-5
oracle.sql.ROWID class, 6-10, 6-15, 6-26
oracle.sql.STRUCT class, 6-10, 8-4
getAutoBuffering() method, 8-9
getConnection() method, 8-4
getDescriptor() method, 8-4
getOracleAttributes() method, 8-4
setAutoBuffering() method, 8-9
toJDBC() method, 8-4
oracle.sql.StructDescriptor class
createDescriptor() method, 8-5
OracleStatement class, 6-18
OracleTypes class, 6-21
OracleTypes class for typecodes, 6-21
OracleTypes.ARRAY class, 5-19
OracleTypes.CURSOR variable, 6-29
OracleTypes.STRUCT class, 5-19
OracleXAConnection class, 16-7
OracleXADataSource class, 16-6
OracleXAResource class, 16-8, 16-9
OracleXid class, 16-13
othersDeletesAreVisible() method (database meta data), 12-28
othersInsertsAreVisible() method (database meta data), 12-28
othersUpdatesAreVisible() method (database meta data), 12-28
OUT parameter mode, 11-6, 11-7
code example, 20-10
outer joins, SQL92 syntax, 21-12
ownDeletesAreVisible() method (database meta deta), 12-27
ownInsertsAreVisible() method (database meta data), 12-28
ownUpdatesAreVisible() method (database meta data), 12-27

P

parameter modes
IN, 11-4
code example, 20-10
IN OUT, 11-4, 11-6
code example, 20-10
OUT, 11-6, 11-7
code example, 20-10
password connection property, 3-6
password, specifying, 3-5
PATH variable, specifying, 2-6
performance enhancements, standard vs. Oracle, 4-5
performance extensions
defining column types, 13-23
prefetching rows, 13-20
TABLE_REMARKS reporting, 13-26
performance optimization, 19-6
PL/SQL
restrictions, 19-9
space padding, 19-8
stored procedures, 3-31
PL/SQL index-by tables
mapping, 11-7
scalar datatypes, 11-2
PL/SQL types
corresponding JDBC types, 11-2
limitations, 21-15
pooled connections
Oracle implementation, 15-14
standard interface, 15-14
position() method, 7-14, 7-23
positioning in result sets, 12-2
prefetching rows, 13-20
suggested default, 13-23
prepare a distributed transaction branch, 16-11
prepareCall(), 14-5
prepareCall() method, 6-18, 14-8, 14-9, 14-10
prepareCallWithKey(), 14-5
prepareCallWithKey() method, 14-10, 14-11
prepared statement
passing BFILE locator, 7-17
passing LOB locators, 7-5
using setObject() method, 5-12
using setOracleObject() method, 5-12
PreparedStatement object
creating, 3-12
prepareStatement(), 14-5
prepareStatement() method, 6-17, 14-8, 14-9, 14-10
code example, 14-8
prepareStatementWithKey(), 14-5
prepareStatementWithKey() method, 14-10, 14-11
previous() method (result set), 12-15
printStackTrace() method (SQLException), 3-34
PrintWriter for a data source, 15-11
put() method
for Properties object, 3-9
for type maps, 8-12, 8-13
putBytes() method, 7-14
putChars() method, 7-15
putString() method, 7-15

Q

query, executing, 3-11

R

RAW class, 6-15
read-only result set concurrency type, 12-4
readSQL() method, 8-15, 8-16
implementing, 8-16
REF class, 6-11
REF CURSORs, 6-28
example program, 20-37
materialized as result set objects, 6-28
refetching rows into a result set, 12-26, 12-29
refreshRow() method (result set), 12-26
registerDriver() method, 6-17
registerIndexTableOutParameter() method, 11-2, 11-6
arguments
int elemMaxLen, 11-6
int elemSqlType, 11-6
int maxLen, 11-6
int paramIndex, 11-6
code example, 11-6
registering Oracle JDBC drivers, class for, 6-17
registerOutParameter() method, 5-13, 6-20
relative positioning in result sets, 12-2
relative() method (result set), 12-14
remarksReporting connection property, 3-7
remarksReporting flag, 13-20
removeConnectionEventListener method (connection cache), 15-22
resource managers, 16-3
result set
auto-commit mode, 19-6
getting BFILE locators, 7-16
getting LOB locators, 7-4
metadata, 6-21
Oracle extensions, 5-3
using getOracleObject() method, 5-5
result set enhancemennts
positioning result sets, 12-13
result set enhancements
concurrency types, 12-4
downgrade rules, 12-11
fetch size, 12-24
limitations, 12-10
Oracle scrollability requirements, 12-5
Oracle updatability requirements, 12-5
positioning, 12-2
processing result sets, 12-16
refetching rows, 12-26, 12-29
result set types, 12-3
scrollability, 12-2
seeing external changes, 12-28
seeing internal changes, 12-27
sensitivity to database changes, 12-2
specifying scrollability, updatability, 12-8
summary of methods, 12-32
summary of visibility of changes, 12-30
updatability, 12-4
updating result sets, 12-18
visibility vs. detection of external changes, 12-29
result set fetch size, 12-24
result set methods, JDBC 2.0, 12-32
result set object
closing, 3-12
result set types for scrollability and sensitivity, 12-3
result set, processing, 3-11
ResultSet class, 3-11
ResultSet() method, 10-10
return types
for getXXX() methods, 5-7
getObject() method, 5-6
getOracleObject() method, 5-6
return values
casting, 5-10
reusePooledConnection() method, 15-23
roll back a distributed transaction branch, 16-12
roll back changes to database, 3-13
rollback method, 17-3, 17-11, 17-14
row prefetching, 13-20
and data streams, 3-30
ROWID class, 6-15
CursorName methods, 21-15
defined, 6-26
ROWID, use for result set updates, 12-5

S

scalar functions, SQL92 syntax, 21-11
schema naming conventions, 6-5
scrollability in result sets, 12-2
scrollable result sets
creating, 12-8
fetch direction, 12-17
implementation of scroll-sensitivity, 12-30
positioning, 12-13
processing backward/forward, 12-16
refetching rows, 12-26, 12-29
scroll-insensitive result sets, 12-3
scroll-sensitive result sets, 12-3
seeing external changes, 12-28
visibility vs. detection of external changes, 12-29
scroll-sensitive result sets
limitations, 12-10
security
authentication, 18-9
encryption, 18-10
integrity, 18-10
Oracle Advanced Security support, 18-8
overview, 18-8
SELECT statement
to retrieve object references, 9-6
to select LOB locator, 7-12
sendBatch() method, 13-7, 13-9
sensitivity in result sets to database changes, 12-2
serialization
ArrayDescriptor object, 10-14
definition of, 8-6, 10-14
StructDescriptor object, 8-6
server-side internal driver
connection to database, 18-26
server-side Thin driver, described, 1-8
sess_sh tool, 15-9
session context, 1-12
for KPRB driver, 18-30
setAsciiStream() method, 5-16
setAutoBuffering() method
of the oracle.sql.ARRAY class, 10-9
of the oracle.sql.STRUCT class, 8-9
setAutoCommit() method, 19-6
setAutoIndexing() method, 10-10
direction parameter values
ARRAY.ACCESS_FORWARD, 10-10
ARRAY.ACCESS_REVERSE, 10-10
ARRAY.ACCESS_UNKNOWN, 10-10
setBFILE() method, 7-17
setBinaryStream() method, 5-16
setBLOB() method, 7-5
setBlob() method, JDK 1.1.x, 7-5
setBlob() method, JDK 1.2.x, 7-5
setBytes() limitations, using streams to avoid, 3-30
setCacheScheme() method (connection cache), 15-26
setCharacterStream() method, 5-16
setCLOB() method, 7-5
setClob() method, 1.1.x, 7-5
setClob() method, JDK 1.2.x, 7-5
setConnection() method
ArrayDescriptor object, 10-14
StructDescriptor object, 8-6
setConnectionPoolDataSource method (connection cache), 15-25
setCursorName() method, 21-15
setCustomDatum() method, 6-19, 8-22, 8-26
setDataSource() method (connection event listener), 15-28
setDate() method, 5-17
setDefaultExecuteBatch() method, 6-18, 13-5
setDefaultRowPrefetch() method, 6-18, 13-21
setDisableStmtCaching() method, 14-8
setEscapeProcessing() method, 21-9
setExecuteBatch() method, 6-19, 13-6
setFetchSize() method, 12-24
setFixedCHAR() method, 5-17
setMaxFieldSize() method, 13-25, 19-8
setNull() method, 5-13, 6-19, 6-20
setObejct() method, 5-11
setObject() method
for BFILES, 7-17
for BLOBs and CLOBs, 7-5
for CustomDatum objects, 8-23
for object references, 9-8
for STRUCT objects, 8-8
to write object data, 8-26
using in prepared statements, 5-12
setOracleObject() method, 5-11, 6-19, 6-20
for BFILES, 7-17
for BLOBs and CLOBs, 7-5
using in prepared statements, 5-12
setPlsqlIndexTable() method, 11-2, 11-4
arguments
int curLen, 11-4
int elemMaxLen, 11-4
int elemSqlType, 11-4
int maxLen, 11-4
int paramIndex, 11-4, 11-7
Object arrayData, 11-4
code example, 11-5
setREF() method, 9-8
setRemarksReporting() method, 6-18, 13-27
setResultSetCache() method, 12-6
setRowPrefetch() method, 6-19, 13-21
setStmtCacheSize() method, 14-6
code example, 14-7
setString() limitations, using streams to avoid, 3-30
setString() method
to bind ROWIDs, 6-26
setTime() method, 5-17
setTimestamp() method, 5-17
setTransactionIsolation() method, 6-18, 19-14
setTypeMap() method, 6-18
setUnicodeStream() method, 5-16
setValue() method, 9-5
setXXX() methods, for empty LOBs, 7-15
setXXX() methods, for specific datatypes, 5-12
signed applets, 1-10
SQL
data converting to Java datatypes, 5-2
primitive types, 6-7
structured types, 6-7
types, constants for, 6-21
SQL engine
relation to the KPRB driver, 18-26
SQL syntax (Oracle), 21-9
SQL92 syntax, 21-9
function call syntax, 21-13
LIKE escape characters, 21-12
outer joins, 21-12
scalar functions, 21-11
time and date literals, 21-9
translating to SQL example, 21-13
SQLData interface, 6-4
advantages, 8-11
described, 8-15
example program, 20-42
Oracle implementation, 6-24
reading data from Oracle objects, 8-17
using with type map, 8-15
writing data from Oracle objects, 8-20
SQLInput interface, 8-15
described, 8-16
SQLInput streams, 8-16
SQLJ
advantages over JDBC, 1-3
guidelines for using, 1-4
SQLNET.ORA
parameters for tracing, 19-11
SQLOutput interface, 8-15
described, 8-16
SQLOutput streams, 8-17
SQLWarning class, limitations, 21-16
start a distributed transaction branch, 16-10
statement caching
explicit, 14-2
code example, 20-81
definition of, 14-4
null data, 14-11
implicit, 14-2
code example, 20-78
concept graphic, 14-3
definition of, 14-2
Least Recently Used (LRU) scheme, 14-4
statement methods, JDBC 2.0 result sets, 12-35
Statement object
closing, 3-12
creating, 3-11
statements
Oracle extensions, 5-3
static SQL, 1-2
stored procedures
Java, 3-32
PL/SQL, 3-31
stream data, 3-19, 7-6
CHAR columns, 3-24
closing, 3-28
example, 3-21
external files, 3-27
LOBs, 3-27
LONG columns, 3-19
LONG RAW columns, 3-19
multiple columns, 3-25
precautions, 3-28
RAW columns, 3-24
row prefetching, 3-30
UPDATE/COMMIT statements, 7-8
use to avoid setBytes() and setString() limitations, 3-30
VARCHAR columns, 3-24
stream data column
bypassing, 3-26
STRUCT class, 6-10
STRUCT descriptor, 8-4, 8-5
STRUCT object, 6-10
attributes, 6-10
creating, 8-4, 8-5
embedded object, 8-7
nested objects, 6-11
retrieving, 8-7
retrieving attributes as oracle.sql types, 8-8
StructDescriptor object
creating, 8-5
deserialization, 8-6
get methods, 8-5
serialization, 8-6
setConnection() method, 8-6
structured objects
class for binding, 6-20

T

TABLE_REMARKS columns, 13-20
TABLE_REMARKS reporting
restrictions on, 13-26
TCP/IP protocol, 1-7, 3-10
Thin driver
applets, 1-10, 18-15
applications, 1-10
CHAR/VARCHAR2 NLS size restrictions, 18-6
described, 1-7
NLS considerations, 18-4
server-side, described, 1-8
time and date literals, SQL92 syntax, 21-9
TNSNAMES entries, 3-4
toDatum() method
applied to CustomDatum objects, 8-11, 8-21
called by setCustomDatum() method, 8-26
toJDBC() method, 8-4
toJdbc() method, 6-10
toString() method, 6-15
trace facility, 19-11
trace parameters
client-side, 19-11
server-side, 19-12
tracing with a data source, 15-11
transaction
client-side demarcation, 17-3
demarcation, 17-3
designating two-phase commit engine, 17-15
enlisting resources, 17-3, 17-7
limitations, 17-7
two-phase commit, 17-5, 17-8
transaction branch, 16-2
transaction branch ID component, 16-13
Transaction class, 17-3
transaction context, 1-12
for KPRB driver, 18-30
transaction IDs (distributed transactions), 16-5
transaction managers, 16-2
TransactionManager class, 17-3
transactions
global, 17-3
overview, 17-2
TTC error messages, listed, A-11
TTC protocol, 1-7
two-phase commit engine, 17-15
type map, 5-4, 6-4
adding entries, 8-13
and STRUCTs, 8-15
creating a new map, 8-14
used with arrays, 10-17
used with SQLData interface, 8-15
using with arrays, 10-22
type map (SQL to Java), 8-10
type mapping
BigDecimal mapping, 8-31
JDBC mapping, 8-30
object JDBC mapping, 8-30
Oracle mapping, 8-30
type mappings
JPublisher options, 8-29
type maps
relationship to database connection, 18-28
TYPE_FORWARD_ONLY result sets, 12-8
TYPE_SCROLL_INSENSITIVE result sets, 12-8
TYPE_SCROLL_SENSITIVE result sets, 12-8
typecodes, Oracle extensions, 6-21

U

UNIX, 15-9
updatability in result sets, 12-4
updatable result set concurrency type, 12-4
updatable result sets
creating, 12-8
DELETE operations, 12-18
INSERT operations, 12-21
limitations, 12-10
refetching rows, 12-26, 12-29
seeing internal changes, 12-27
update conflicts, 12-23
UPDATE operations, 12-19
update batching
overview, Oracle vs. standard model, 13-2
overview, statements supported, 13-3
update batching (Oracle model)
batch value, checking, 13-7
batch value, overriding, 13-7
committing changes, 13-8
connection batch value, setting, 13-5
connection vs. statement batch value, 13-4
default batch value, 13-5
disable auto-commit, 13-4
example, 13-9
limitations and characteristics, 13-5
overview, 13-4
statement batch value, setting, 13-6
stream types not allowed, 13-5
update counts, 13-9
update batching (standard model)
adding to batch, 13-11
clearing the batch, 13-14
committing changes, 13-14
error handling, 13-17
example, 13-16
executing the batch, 13-13
intermixing batched and non-batched, 13-18
overview, 13-10
sample application, 20-68
stream types not allowed, 13-11
update counts, 13-15
update counts upon error, 13-17
update conflicts in result sets, 12-23
update counts
Oracle update batching, 13-9
standard update batching, 13-15
upon error (standard batching), 13-17
UPDATE in a result set, 12-19
updateRow() method (result set), 12-20
updatesAreDetected() method (database meta data), 12-29
updateXXX() methods (result set), 12-19, 12-21
updateXXX() methods for empty LOBs, 7-15
updating result sets, 12-18
user connection property, 3-6
userid, specifying, 3-5
UserTransaction object
begin method, 17-3, 17-10, 17-13
binding in namespace, 17-8, 17-10, 17-13
commit method, 17-3, 17-11, 17-14
rollback method, 17-3, 17-11, 17-14
using, 18-17

V

VARCHAR2 columns, 19-8
NLS size restrictions, Thin, 18-6
varrays
example program, 20-34

W

WIDTH, parameter for APPLET tag, 18-24
window, scroll-sensitive result sets, 12-30
writeSQL() method, 8-15, 8-17
implementing, 8-16

X

XA
connection implementation, 16-7
connections (definition), 16-4
data source implementation, 16-6
data sources (definition), 16-3
definition, 16-2
error handling, 16-16
example of implementation, 16-18
exception classes, 16-15
Oracle optimizations, 16-17
Oracle transaction ID implementation, 16-13
resource implementation, 16-8
resources (definition), 16-4
sample application (suspend/resume), 20-93
sample application (two-phase commit), 20-1, 20-98
transaction ID interface, 16-13
XAException, 16-13
Xids, 16-13

Go to previous page
Oracle
Copyright © 1996-2000, Oracle Corporation.

All Rights Reserved.

Library

Solution Area

Contents