Oracle8i JDBC Developer's Guide and Reference
Release 2 (8.1.6)

A81354-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 


A

absolute positioning in result sets, 11-2
absolute() method (result set), 11-14
addBatch() method, 12-12
addConnectionEventListener() method (connection cache), 13-19
afterLast() method (result sets), 11-14
ANO (Oracle Advanced Security), 15-8
APPLET HTML tag, 15-24
applets
connecting to a database, 15-15
deploying in an HTML page, 15-24
for JDK 1.2.x or 1.1.x browser, 15-23
packaging, 15-23
packaging and deploying, 1-11
signed applets
browser security, 15-20
object-signing certificate, 15-20
using, 15-20
using with firewalls, 15-20
working with, 15-15
ARCHIVE, parameter for APPLET tag, 15-25
ARRAY class
and nested tables, 5-12
and VARRAYs, 5-12
creating instances, 10-9
described, 10-2
getArray() method, 10-6
getBaseType() method, 10-6
getBaseTypeName() method, 10-6
getConnection() method, 10-6
getDescriptor() method, 10-6
getOracleArray() method, 10-6
getResultSet() method, 10-6
getSQLTypeName() method, 10-6
length() method, 10-6
overview, 5-12
array descriptors
creating, 10-16
described, 10-8
introduced, 5-12
ArrayDescriptor class
createDescriptor() method, 10-10
creating instances, 10-9
get methods, 10-10
getArrayType() method, 10-10
getBaseName() method, 10-10
getBaseType() method, 10-10
getConnection() method, 10-10
getMaxLength() method, 10-10
arrays
defined, 10-2
example program, 17-26
getting, 10-15
passing to callable statement, 10-17
retrieving from a result set, 10-11
retrieving partial arrays, 10-14
using type maps, 10-18
working with, 10-2
ASO (Oracle Advanced Security), 15-8
authentication (security), 15-9
AUTHENTICATION_LEVEL parameter, 15-18
auto-commit mode
defined, 3-13
disabling, 16-6

B

batch updates--see update batching
batch value
checking value, 12-7
connection batch value, setting, 12-5
connection vs. statement value, 12-4
default value, 12-5
overriding value, 12-7
statement batch value, setting, 12-6
BatchUpdateException, 12-17
beforeFirst() method (result sets), 11-13
BFILE
accessing data, 7-21
creating and populating columns, 7-19
defined, 3-28
example program, 17-31
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
selecting, 5-12
manipulating data, 7-21
reading data, 7-18
BFILE class
closeFile() method, 7-22
getBinaryStream() method, 7-22
getBytes() method, 7-22
getDirAlias() method, 7-22
getName() method, 7-22
isFileOpen() method, 7-22
length() method, 7-22
openFile() method, 7-22
overview, 5-12
position() method, 7-22
BigDecimal mapping (for attributes), 8-30
bind by name limitations, 18-16
BLOB
creating and populating, 7-10
creating columns, 7-11
introduction, 7-2
locators
getting from result set, 7-4
passing to callable statements, 7-6
passing to prepared statement, 7-5
retrieving, 7-3
selecting, 5-12
manipulating data, 7-12
populating columns, 7-11
reading data, 7-6, 7-8
writing data, 7-9
BLOB class
getBinaryOutputStream() method, 7-13
getBinaryStream() method, 7-13
getBufferSize() method, 7-13
getBytes() method, 7-13
getChunkSize() method, 7-13
length() method, 7-14
overview, 5-12
position() method, 7-14
putBytes() method, 7-14
Boolean parameters, restrictions, 16-9
branch qualifier (distributed transactions), 14-13

C

cache schemes (connection cache), 13-24
caching, client-side
custom use for scrollable result sets, 11-6
Oracle use for scrollable result sets, 11-5
callable statement
use for stored procedures, 3-31
using getOracleObject() method, 6-5
cancelRowUpdates() method (result set), 11-20
casting return values, 6-10
catalog arguments (DatabaseMetaData), 18-16
CHAR class
conversions with server-side internal driver, 15-34
creating instances, 5-13
described, 5-13
getString() method, 5-14
getStringWithReplacement() method, 5-15
toString() method, 5-15
CHAR columns
NLS size restrictions, Thin, 15-6
space padding, 16-8
using setFixedCHAR() to match in WHERE, 6-17
character sets
client-server conversions, 5-15
conversions with server-side internal driver, 15-34
CharacterSet class, 5-13
checksums
code example, 15-13
setting parameters in Java, 15-13
support by OCI drivers, 15-11
support by Thin driver, 15-12
Class.forName() method, 3-3
CLASSPATH, specifying, 2-6
clearBatch() method, 12-14
clearDefines() method, 12-24
client installation, 1-10
CLOB
creating and populating, 7-10
creating columns, 7-11
introduction, 7-2
locators
getting from result set, 7-4
passing to callable statements, 7-6
passing to prepared statement, 7-5
retrieving, 7-3
selecting, 5-12
manipulating data, 7-12
populating columns, 7-11
reading data, 7-6, 7-8
writing data, 7-9
CLOB class
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-14
length() method, 7-14
overview, 5-12
position() method, 7-15
putChars() method, 7-15
putString() method, 7-15
supported character sets, 7-13
close() method, callable statement, 5-20
close() method, OracleConnectionCache interface, 13-21
close() method, prepared statement, 5-19
close() method, statement objects, 5-19
closeFile() method for BFILEs, 7-22
closePooledConnection() method, 13-21
CMAN.ORA file, creating, 15-18
CODE, parameter for APPLET tag, 15-24
CODEBASE, parameter for APPLET tag, 15-25
collections
creating strongly typed, 10-8
defined, 10-2
column types, defining, 12-23
commit
changes to database, 3-13
distributed transaction branch, 14-12
CONCUR_READ_ONLY result sets, 11-9
CONCUR_UPDATABLE result sets, 11-9
concurrency types in result sets, 11-4
connect string
for database connection, 3-3
for server-side internal driver, 15-28
for the Oracle8 Connection Manager, 15-18
connection
closing, 3-14
from an applet, 15-15
opening, 3-3
opening for JDBC OCI driver, 3-8
opening for JDBC Thin driver, 3-9
Properties object, 3-6
read-only, 16-14
testing, 2-8
via multiple Connection Managers, 15-19
with server-side internal driver, 1-12, 15-26
connection caching
adding connection event listener, 13-19
basics, accessing the cache, 13-16
basics, closing connections, 13-17
basics, opening connections, 13-16
basics, setting up a cache, 13-15
cache instance getConnection() method, 13-16
connection events, 13-17
creating connection event listener, 13-19
implementation scenarios, 13-17
OracleConnectionCache interface, 13-21
OracleConnectionCacheImpl class, 13-22
OracleConnectionEventListener class, 13-25
overview, 13-15
preliminary steps, 13-18
removing connection event listener, 13-20
steps in closing a connection, 13-20
steps in opening a connection, 13-18
connection event listener, 13-19
Connection Manager
installing, 15-17
starting, 15-18
using multiple managers, 15-19
with applets, 1-10, 15-16, 15-17
writing the connect string, 15-18
connection methods, JDBC 2.0 result sets, 11-32
connection pooling
concepts, 13-11
creating data source and connecting, 13-13
introduction, 13-11
Oracle data source implementation, 13-12
pooled connections, 13-13
sample application, 17-74
standard data source interface, 13-12
connection properties
database, 3-7
defaultBatchValue, 3-7
defaultRowPrefetch, 3-7
password, 3-7
put() method, 3-8
remarksReporting, 3-7
user, 3-7
connectionClosed() method (connection event listener), 13-26
connectionErrorOccurred() method (connection event listener), 13-26
CREATE DIRECTORY statement, BFILEs, 7-19
CREATE TABLE statement
to create BFILE columns, 7-19
to create BLOB, CLOB columns, 7-10
create() method, CustomDatumFactory interface, 8-21
createDescriptor() method, ArrayDescriptor, 10-10
createDescriptor() method, StructDescriptor, 8-5
createStatement() method, 5-17
CursorName limitations, 18-15
cursors, closing resources, 16-8
custom collection classes
and JPublisher, 10-20
defined, 10-2, 10-20
custom Java classes
creating, 17-35, 17-38, 17-39
defined, 8-2
custom object classes
creating, 8-9
creating with JPublisher, 8-28
defined, 8-2
custom reference classes
and JPublisher, 9-10
defined, 9-2, 9-10
CustomDatum interface
additional uses, 8-26
advantages, 8-10
described, 8-20
example program, 17-38, 17-39
introduced, 5-4
reading data, 8-23
writing data, 8-25
CustomDatumFactory interface, 8-20

D

data conversions
considerations, 6-2
LONG, 3-20
LONG RAW, 3-20
data sources
creating and connecting (with JNDI), 13-7
creating and connecting (without JNDI), 13-7
logging and tracing, 13-9
Oracle implementation, 13-3
PrintWriter, 13-9
properties, 13-4
sample application (with JNDI), 17-70
sample application (without JNDI), 17-71
standard interface, 13-3
database connection property, 3-7
database meta data
catalog parameter, 18-16
entry points for applets, 15-24
methods regarding scalar function support, 18-11
methods, JDBC 2.0 result sets, 11-35
datatypes
classes, 5-7
Java, 3-16
Java native, 3-16
JDBC, 3-16
mappings, 3-16
Oracle SQL, 3-16
DATE class, 5-15
Datum class, 5-7
DBMS_LOB package, 7-6
debugging JDBC programs, 16-11
DEFAULT_CHARSET character set value, 5-14
defaultBatchValue connection property, 3-7
defaultConnection() method, 15-26
defaultRowPrefetch connection property, 3-7
defineColumnType() method, 3-24, 5-19, 12-24
DELETE in a result set, 11-18
deleteRow() method (result set), 11-18
deletesAreDetected() method (database meta data), 11-29
Dictionary class (for type maps), 8-11
distributed transactions
branch qualifier, 14-13
check for same resource manager, 14-13
commit a transaction branch, 14-12
components and scenarios, 14-2
concepts, 14-3
distributed transaction ID component, 14-13
end a transaction branch, 14-11
example of implementation, 14-18
global transaction identifier, 14-13
ID format identifier, 14-13
introduction, 14-2
Oracle XA connection implementation, 14-7
Oracle XA data source implementation, 14-6
Oracle XA ID implementation, 14-13
Oracle XA optimizations, 14-17
Oracle XA resource implementation, 14-8
prepare a transaction branch, 14-11
roll back a transaction branch, 14-12
sample application (suspend/resume), 17-79
sample application (two-phase commit), 17-84
start a transaction branch, 14-10
transaction branch ID component, 14-13
XA connection interface, 14-7
XA data source interface, 14-6
XA error handling, 14-16
XA exception classes, 14-15
XA ID interface, 14-13
XA resource functionality, 14-9
XA resource interface, 14-8
DriverManager class, 3-3
dynamic SQL, 1-2
DYNAMIC_SCHEME (connection cache), 13-24

E

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

F

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

G

getActiveSize() method (connection cache), 13-25
getArray() method
introduced, 10-11
usage, 10-6
using type maps, 10-13
getARRAY() method, retrieving an array, 10-11
getArrayType() method, 10-10
getAsciiOutputStream() method for CLOBs, 7-7, 7-14
getAsciiStream() method for CLOBs, 7-7, 7-14
getAttributes() method for embedded objects, 8-14
getAttributes() method for STRUCTs, 8-3
getBaseName() method, 10-10
getBaseType() method, 10-6, 10-10, 10-15
getBaseTypeName() method, 9-5, 10-6
getBinaryOutputStream() method for BLOBs, 7-7, 7-13
getBinaryStream() method for BFILEs, 7-18, 7-22
getBinaryStream() method for BLOBs, 7-7, 7-13
getBinaryStream() method for LONG RAW, 3-22
getBufferSize() method for BLOBs, 7-13
getBufferSize() method for CLOBs, 7-14
getBytes() method for BFILEs, 7-22
getBytes() method for BLOBs, 7-13
getBytes() method for LONG RAW, 3-23
getBytes() method, general, 5-10
getCacheSize() method (connection cache), 13-25
getCharacterOutputStream() method for CLOBs, 7-7, 7-14
getCharacterStream() method for CLOBs, 7-7, 7-14
getChars() method for CLOBs, 7-14
getChunkSize() method for BLOBs, 7-13
getChunkSize() method for CLOBs, 7-14
getColumnCount() method, 5-21
getColumnName() method, 5-21
getColumns() method, 12-27
getColumnType() method, 5-21, 6-19
getColumnTypeName() method, 5-21, 6-19
getConcurrency() method (result set), 11-12
getConnection() method
its forms and signatures, 3-4
with server-side internal driver, 15-26
getConnection() method for array descriptors, 10-10
getConnection() method for arrays, 10-6
getConnection() method for STRUCTs, 8-4
getCursor() method, 5-28, 5-29
getCursorName() method, limitations, 18-15
getCustomDatum() method, 8-21, 8-23
getDefaultExecuteBatch() method, 5-18, 12-7
getDefaultRowPrefetch() method, 5-18, 12-21
getDescriptor() method
for ARRAYs, 10-6
getDescriptor() method, for STRUCTs, 8-4
getDirAlias() method for BFILEs, 7-21, 7-22
getErrorCode() method (SQLException), 3-33
getExecuteBatch() method, 5-19, 12-6, 12-7
getFetchSize() method, 11-24
getMaxLength() method for arrays, 10-10
getMessage() method (SQLException), 3-33
getName() method for BFILEs, 7-21, 7-22
getNumericFunctions() method, 18-11
getObject() method
and SQLInput streams, 8-15
and SQLOutput streams, 8-16
casting return values, 6-10
for CustomDatum objects, 8-22
for Struct objects, 8-6
return types, 6-4, 6-6
to get BFILE locators, 7-16
to get Oracle objects, 8-7
used with CustomDatum interface, 8-24
getOracleArray() method, 10-6, 10-11, 10-15
getOracleAttributes() method, 8-4, 8-7
getOracleObject() method
casting return values, 6-10
in callable statements, 5-20
in result sets, 5-21
return types, 6-4, 6-6
using in callable statement, 6-5
using in result set, 6-5
getProcedureColumns() method, 12-27
getProcedures() method, 12-27
getREF() method, 9-6, 9-7
getRemarksReporting() method, 5-18
getResultSet() method, arrays, 10-6
getResultSet() method, statement objects, 5-19
getRow() method (result set), 11-15
getRowPrefetch() method, 5-19, 12-21
getSQLState() method (SQLException), 3-33
getSQLTypeName() method for ARRAYs, 10-6, 10-15
getSQLTypeName() method for STRUCTs, 8-3
getString() method
to get ROWIDs, 5-26
usage, 5-14
getStringFunctions() method, 18-11
getStringWithReplacement() method, 5-15
getSTRUCT() method, 8-7
getSubString() method for CLOBs, 7-7, 7-14
getSystemFunctions() method, 18-11
getTableName() method, 5-21
getTimeDateFunctions() method, 18-11
getTransactionIsolation() method, 5-18, 16-14
getType() method (result set), 11-12
getTypeMap() method, 5-18, 8-12
getUpdateCounts() method (BatchUpdateException), 12-17
getValue() method, REFs, 9-5, 9-6
getXXX() methods
casting return values, 6-10
for specific datatypes, 6-7
in callable statements, 5-20
in result sets, 5-21
global transaction identifier (distributed transactions), 14-13
global transactions, 14-2

H

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

I

IEEE 754 floating-point compliance, 18-15
INSERT in a result set, 11-21
insertRow() method (result set), 11-22
insertsAreDetected() method (database meta data), 11-29
installation
client, 1-10
directories and files, 2-4
verifying on the client, 2-4
integrity
code example, 15-13
overview, 15-10
setting parameters in Java, 15-13
support by OCI drivers, 15-11
support by Thin driver, 15-12
internal changes (result set)
defined, 11-27
seeing, 11-27
isAfterLast() method (result set), 11-15
isBeforeFirst() method (result set), 11-15
isFileOpen() method for BFILEs, 7-22
isFirst() method (result set), 11-15
isLast() method (result set), 11-15
isSameRM() (distributed transactions), 14-13

J

Java
compiling and running, 2-7
datatypes, 3-16
native datatypes, 3-16
stored procedures, 3-32
stream data, 3-19
Java Naming and Directory Interface (JNDI), 13-2
Java Sockets, 1-7
java.math, Java math packages, 3-2
java.sql, JDBC packages, 3-2
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
Oracle JDBC limitations, 18-15
sample files, 2-7
testing, 2-8
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, 15-3
applets, 1-10
applications, 1-10
choosing a driver for your needs, 1-9
common features, 1-6
common problems, 16-8
compatibilities, 2-2
determining driver version, 2-7
introduction, 1-5
registering, 3-3
requirements, 2-2
restrictions, 16-9
SQL92 syntax, 18-9
JDBC mapping (for attributes), 8-29
JdbcCheckup program, 2-8
JDeveloper, 1-14
JDK
migration from 1.1.x to 1.2.x, 4-5
versions supported, 1-13
JNDI
looking up data source, 13-9
overview of Oracle support, 13-2
registering data source, 13-8
JPublisher utility
creating custom collection classes, 10-20
creating custom Java classes, 8-28
creating custom reference classes, 9-10
described, 5-4, 8-9
SQL type categories and mapping options, 8-29
type mapping modes and settings, 8-29
type mappings, 8-28

L

last() method (result set), 11-14
LD_LIBRARY_PATH variable, specifying, 2-6
length() method for arrays, 10-6
length() method for BFILEs, 7-22
length() method for BLOBs, 7-14
length() method for CLOBs, 7-14
LIKE escape characters, SQL92 syntax, 18-12
limitations
bind by name, 18-16
catalog arguments to DatabaseMetaData calls, 18-16
CursorName, 18-15
IEEE 754 floating-point compliance, 18-15
on setBytes() and setString(), use of streams to avoid, 3-30
PL/SQL TABLE, BOOLEAN, RECORD types, 18-15
read-only connection, 16-14
SQL92 outer join escapes, 18-15
SQLWarning class, 18-16
LOB
defined, 3-27
introduction, 7-2
locators, 7-2
getting from callable statements, 7-4
getting from result sets, 7-4
passing, 7-5
reading data, 7-6
sample program, 17-17
locators
getting for BFILEs, 7-16
getting for BLOBs, 7-3
getting for CLOBs, 7-3
LOB, 7-2
logging with a data source, 13-9
logical connection instance, 13-11
LONG data conversions, 3-20
LONG RAW data conversions, 3-20

M

Map interface (for type maps), 8-11, 10-14
memory leaks, closing resources, 16-8
migration from JDK 1.1.x to 1.2.x, 4-5
moveToCurrentRow() method (result set), 11-21
moveToInsertRow() method (result set), 11-21
mutable arrays, 10-20

N

named collections, 10-2, 10-8
National Language Support--see NLS
nested tables
defined, 10-3
usage of arrays to materialize, 10-5
Net8
name-value pair, 3-4
protocol, 1-7
network events, trapping, 16-11
next() method (result set), 11-16
NLS
and JDBC drivers, 15-3
conversions, 15-3
for JDBC OCI drivers, 15-3
for JDBC Thin drivers, 15-4
for server-side internal driver, 15-4
Java methods that employ, 15-2
Thin driver CHAR/VARCHAR2 size restrictions, 15-6
using, 15-2
NLS_LANG environment variable, 15-3
NULL data, converting, 6-2
NUMBER class, 5-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-29
OCI driver
applications, 1-10
described, 1-8
NLS considerations, 15-3
openFile() method for BFILEs, 7-22
optimization, performance, 16-6
Oracle Advanced Security
support by JDBC, 15-8
support by OCI drivers, 15-8
support by Thin driver, 15-9
Oracle Application Server, 1-14
Oracle datatypes, 6-1
Oracle extensions
datatype support, 5-3
object support, 5-4
packages, 5-2
performance extensions, 12-1
result sets, 6-3
schema naming support, 5-5
statements, 6-3
support under 8.0.x/7.3.x drivers, 5-29
to JDBC, 5-1, 6-1, 8-1, 9-1, 10-1
Oracle mapping (for attributes), 8-29
Oracle objects
and JDBC, 8-2
converting with CustomDatum interface, 8-20
converting with SQLData interface, 8-14
getting with getObject() method, 8-7
Java classes which support, 8-3
mapping to custom object classes, 8-9
reading data by using SQLData interface, 8-17
working with, 8-2
writing data by using SQLData interface, 8-19
Oracle SQL datatypes, 3-16
OracleCallableStatement class
close() method, 5-20
described, 5-20
getOracleObject() method, 5-20
getXXX() methods, 5-20, 6-7
registerOutParameter() method, 5-20, 6-13
setNull() method, 5-20
setOracleObject() method, 5-20
setXXX() methods, 5-20
OracleConnection class
createStatement() method, 5-17
described, 5-17
getDefaultExecuteBatch() method, 5-18
getDefaultRowPrefetch() method, 5-18
getRemarksReporting() method, 5-18
getTransactionIsolation() method, 5-18, 16-14
getTypeMap() method, 5-18
prepareCall() method, 5-18
prepareStatement() method, 5-17
setDefaultExecuteBatch() method, 5-18
setDefaultRowPrefetch() method, 5-18
setRemarksReporting() method, 5-18
setTransactionIsolation() method, 5-18, 16-14
setTypeMap() method, 5-18
OracleConnectionCache interface
close() method, 13-21
closePooledConnection() method, 13-21
described, 13-21
reusePooledConnection() method, 13-21
OracleConnectionCacheImpl class
described, 13-22
getActiveSize() method, 13-25
getCacheSize() method, 13-25
instantiating and setting properties, 13-22
schemes for new pooled connections, 13-24
setCacheScheme() method, 13-24
setConnectionPoolDataSource() method, 13-23
setMaxLimit() method, 13-24
setting maximum pooled connections, 13-24
OracleConnectionEventListener class
connectionClosed() method, 13-26
connectionErrorOccurred() method, 13-26
described, 13-25
instantiating, 13-25
setDataSource() method, 13-26
OracleConnectionPoolDataSouorce class, 13-12
OracleDataSource class, 13-3
OracleDriver class
defaultConnection() method, 15-27
described, 5-17
oracle.jdbc2 package, described, 5-24
oracle.jdbc.driver package, 5-16
oracle.jdbc.pool package, 13-14
oracle.jdbc.xa package and subpackages, 14-5
OraclePooledConnection class, 13-13
OraclePreparedStatement class
close() method, 5-19
described, 5-19
getExecuteBatch() method, 5-19
setCustomDatum() method, 5-19
setExecuteBatch() method, 5-19
setNull() method, 5-19
setOracleObject() method, 5-19
setXXX() methods, 5-19
OracleResultSet class
described, 5-21
getOracleObject() method, 5-21
getXXX() methods, 5-21, 6-7
OracleResultSetCache interface, 11-6
OracleResultSetMetaData class
described, 5-21
getColumnCount() method, 5-21
getColumnName() method, 5-21
getColumnType() method, 5-21
getColumnTypeName() method, 5-21
getTableName() method, 5-21
using, 6-19
oracle.sql package
data conversions, 6-2
datatype classes, 5-7
datatype support, 5-9
described, 5-7
OracleSql.parse() method, 18-13
OracleStatement class
close() method, 5-19
defineColumnType(), 5-19
described, 5-18
executeQuery() method, 5-18
getResultSet() method, 5-19
getRowPrefetch() method, 5-19
setRowPrefetch() method, 5-19
OracleTypes class (for typecodes), 5-22, 12-24
OracleXAConnection class, 14-7
OracleXADataSource class, 14-6
OracleXAResource class, 14-8
OracleXid class, 14-13
othersDeletesAreVisible() method (database meta data), 11-28
othersInsertsAreVisible() method (database meta data), 11-28
othersUpdatesAreVisible() method (database meta data), 11-28
outer joins, SQL92 syntax, 18-12
ownDeletesAreVisible() method (database meta data), 11-28
ownInsertsAreVisible() method (database meta data), 11-28
ownUpdatesAreVisible() method (database meta data), 11-28

P

password connection property, 3-7
password, specifying, 3-5
PATH variable, specifying, 2-6
performance extensions
defining column types, 12-23
introduction, 12-1
prefetching rows, 12-20
standard vs. Oracle, 4-5
TABLE_REMARKS reporting, 12-27
performance optimization, 16-6
PL/SQL
JDBC type support limitations, 18-15
restrictions, 16-9
space padding, 16-8
stored procedures, 3-31
pooled connections
Oracle implementation, 13-13
standard interface, 13-13
position() method for BFILEs, 7-22
position() method for BLOBs, 7-14
position() method for CLOBs, 7-15
positioning in result sets, 11-2
prefetching rows
described, 12-20
suggested default, 12-23
prepare a distributed transaction branch, 14-11
prepareCall() method, 5-18
prepared statement
creating prepared statement object, 3-12
using setObject() method, 6-12
using setOracleObject() method, 6-12
prepareStatement() method, 5-17
previous() method (result set), 11-16
printStackTrace() method (SQLException), 3-34
PrintWriter for a data source, 13-9
put() method
for Properties object, 3-8
for type maps, 8-12
putBytes() method for BLOBs, 7-14
putChars() method for CLOBs, 7-15
putString() method for CLOBs, 7-15

Q

query, executing, 3-10

R

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

S

scalar functions, SQL92 syntax, 18-11
schema naming conventions, 5-5
scrollability in result sets, 11-2
scrollable result sets
creating, 11-8
fetch direction, 11-17
implementation of scroll-sensitivity, 11-30
positioning, 11-13
processing backward/forward, 11-16
refetching rows, 11-26, 11-29
scroll-insensitive result sets, 11-3
scroll-sensitive result sets, 11-3
seeing external changes, 11-28
visibility vs. detection of external changes, 11-29
scroll-sensitive result sets, limitations, 11-10
security
authentication, 15-9
encryption, 15-10
integrity, 15-10
Oracle Advanced Security support, 15-8
overview, 15-8
sendBatch() method, 12-7, 12-9
sensitivity in result sets to database changes, 11-2
server-side internal driver
connect string for, 15-28
connection to database, 15-26
described, 15-26
introduced, 1-8
NLS considerations, 15-4
relation to the SQL engine, 15-26
session context, 15-30
testing, 15-30
transaction context, 15-30
server-side Thin driver, described, 1-8
session context, server-side internal driver, 1-12, 15-30
setAsciiStream() method, 6-16
setAutoCommit() method, 16-6
setBFILE() method, 7-17
setBinaryStream() method, 6-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), 13-24
setCharacterStream() method, 6-16
setCLOB() method, 7-5
setClob() method, JDK 1.1.x, 7-5
setClob() method, JDK 1.2.x, 7-5
setConnectionPoolDataSource method (connection cache), 13-23
setCursorName() method, limitations, 18-15
setCustomDatum() method, 5-19, 8-22, 8-25
setDataSource() method (connection event listener), 13-26
setDate() method, 6-17
setDefaultExecuteBatch() method, 5-18, 12-5
setDefaultRowPrefetch() method, 5-18, 12-21
setEscapeProcessing() method, 18-9
setExecuteBatch() method, 5-19, 12-6
setFetchSize() method, 11-24
setFixedCHAR() method, 6-17
setMaxFieldSize() method, 12-25, 16-8
setNull() method
forms and signatures, 6-13
in callable statements, 5-20
in prepared statements, 5-19
setObject() method
for BFILES, 7-17
for BLOBs and CLOBs, 7-5
for CustomDatum objects, 8-22
for object references, 9-8
for STRUCT objects, 8-8
to write object data, 8-26
usage, 6-11
using in prepared statements, 6-12
setOracleObject() method
for BFILES, 7-17
for BLOBs and CLOBs, 7-5
in callable statements, 5-20
in prepared statements, 5-19
usage, 6-11
using in prepared statements, 6-12
setREF() method, 9-8
setRemarksReporting() method, 5-18, 12-27
setResultSetCache() method, 11-7
setRowPrefetch() method, 5-19, 12-21
setString() method
limitations, using streams to avoid, 3-30
to bind ROWIDs, 5-26
setTime() method, 6-17
setTimestamp() method, 6-17
setTransactionIsolation() method, 5-18, 16-14
setTypeMap() method, 5-18
setUnicodeStream() method, 6-16
setValue() method, REFs, 9-5
setXXX() methods
for specific datatypes, 6-12
in callable statements, 5-20
in prepared statements, 5-19
signed applets, 1-10
SQL
data converting to Java datatypes, 6-2
primitive types, 5-7
structured types, 5-7
SQL engine, relation to server-side internal driver, 15-26
SQL syntax (Oracle), 18-9
SQL92 syntax, 18-9
function call syntax, 18-13
LIKE escape characters, 18-12
outer joins, 18-12
scalar functions, 18-11
time and date literals, 18-9
translating to SQL example, 18-13
SQLData interface
advantages, 8-10
described, 8-14
example program, 17-35
introduced, 5-4
Oracle implementation, 5-25
reading data from Oracle objects, 8-17
using with type map, 8-14
writing data from Oracle objects, 8-19
SQLException class, 3-33
SQLInput interface
described, 8-15
introduced, 8-14
SQLJ
advantages over JDBC, 1-3
guidelines for using, 1-4
SQLNET.ORA, parameters for tracing, 16-11
SQLOutput interface
described, 8-15
introduced, 8-14
SQLWarning class, limitations, 18-16
start a distributed transaction branch, 14-10
statement methods, JDBC 2.0 result sets, 11-35
Statement object
closing, 3-11
creating, 3-10
statements, Oracle extensions, 6-3
static SQL, 1-2
stored procedures
Java, 3-32
PL/SQL, 3-31
stream data
avoiding streams, 3-24
bypassing stream column, 3-26
CHAR columns, 3-24
closing, 3-28
example, 3-22
example program, 17-10
external files, 3-27
LOBs, 3-27, 7-6
LONG columns, 3-19
LONG RAW columns, 3-19
multiple columns, 3-25
overview, 3-19
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
STRUCT
creating instances, 8-5
descriptor, 8-5
embedded object, 8-6
nested objects, 5-11
object attributes, 5-10
retrieving, 8-6
retrieving attributes as oracle.sql types, 8-7
STRUCT class
getConnection() method, 8-4
getDescriptor() method, 8-4
getOracleAttributes() method, 8-4
overview, 5-10
toJdbc() method, 8-4
STRUCT descriptor, 8-6
Struct interface
getAttributes() method, 8-3
getSQLTypeName() method, 8-3
implementation by STRUCT class, 5-10
StructDescriptor class
createDescriptor() method, 8-5
creating instances, 8-5
get methods, 8-6
usage, 8-5

T

TABLE_REMARKS reporting, 12-27
TCP/IP protocol, 1-7, 3-10
Thin driver
applets, 1-10, 15-15
applications, 1-10
CHAR/VARCHAR2 NLS size restrictions, 15-6
described, 1-7
NLS considerations, 15-4
server-side, described, 1-8
time and date literals, SQL92 syntax, 18-9
TNSNAMES entries, 3-4
toDatum() method
applied to CustomDatum objects, 8-10, 8-21
called by setCustomDatum() method, 8-26
toJdbc() method, 5-10, 8-4
toString() method, 5-15
trace facility, 16-11
trace parameters
client-side, 16-12
server-side, 16-13
tracing with a data source, 13-9
transaction branch
defined, 14-2
ID component, 14-13
transaction context, server-side internal driver, 1-12, 15-30
transaction IDs (distributed transactions), 14-5
transaction managers, 14-2
TTC error messages, listed, A-11
TTC protocol, 1-7
type map
adding entries, 8-12
and STRUCTs, 8-14
creating a new map, 8-13
defined, 5-4
relationship to database connection, 15-28
usage by getObject(), 6-4
usage with arrays, 10-18
usage with custom object classes, 8-9
usage with structured object arrays, 10-13
used with SQLData interface, 8-14
type mapping
BigDecimal mapping, 8-30
JDBC mapping, 8-29
JPublisher options, 8-28
object JDBC mapping, 8-29
Oracle mapping, 8-29
TYPE_FORWARD_ONLY result sets, 11-8
TYPE_SCROLL_INSENSITIVE result sets, 11-8
TYPE_SCROLL_SENSITIVE result sets, 11-8
typecodes, standard and Oracle extensions, 5-22
Types class (for typecodes), 12-24

U

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

V

VARCHAR2, NLS restrictions, Thin, 15-6
VARRAYs
defined, 10-3
example program, 17-26
usage of arrays to materialize, 10-5

W

WIDTH, parameter for APPLET tag, 15-24
window, scroll-sensitive result sets, 11-30
writeSQL() method
described, 8-14
implementing, 8-16
usage, 8-16

X

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


Prev
Oracle
Copyright © 1999 Oracle Corporation.

All Rights Reserved.

Library

Product

Contents