Sqlj.runtime.sqlnullexception Class; Sqlj.runtime.streamwrapper Class - IBM DB2 Manual

Table of Contents

Advertisement

setMaxRows
setQueryTimeout

sqlj.runtime.SQLNullException class

The sqlj.runtime.SQLNullException class is derived from the
java.sql.SQLException class.
An sqlj.runtime.SQLNullException is thrown when an SQL NULL value is fetched
into a host identifier with a Java primitive type. The SQLSTATE value for an
instance of SQLNullException is '22002'.

sqlj.runtime.StreamWrapper class

The sqlj.runtime.StreamWrapper class wraps a java.io.InputStream instance and
extends the java.io.InputStream class.
314
Application Programming Guide and Reference for Java
Parameters:
max-bytes
The maximum number of bytes that SQLJ should return from a BINARY,
VARBINARY, CHAR, VARCHAR, GRAPHIC, or VARGRAPHIC column. A
value of 0 means that the number of bytes is unlimited. 0 is the default.
Format:
public synchronized void setMaxRows(int max-rows)
Specifies the maximum number of rows that are returned for any query that
uses the given execution context. If this limit is exceeded, SQLJ discards the
remaining rows.
Parameters:
max-rows
The maximum number of rows that SQLJ should return for a query that
uses the given execution context. A value of 0 means that the number of
rows is unlimited. 0 is the default.
Format:
public synchronized void setQueryTimeout(int timeout-value)
Specifies the maximum number of seconds that SQL operations that use the
given execution context object can execute. If an SQL operation exceeds the
limit, an SQLException is thrown.
Parameters:
timeout-value
The maximum number of seconds that SQL operations that use the given
execution context object can execute. 0 means that execution time is
unlimited. 0 is the default. For IBM Data Server Driver for JDBC and SQLJ
type 2 connectivity on DB2 for z/OS database servers, 0 is the only valid
value.
Related tasks
"Controlling the execution of SQL statements in SQLJ" on page 142
Related reference
"sqlj.runtime.ResultSetIterator interface" on page 299
Related tasks
"Making batch updates in SQLJ applications" on page 119

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents