All Implemented Interfaces:
PreparedStatement
{?= call <procedure-name>[(<arg1>,<arg2>, ...)]} {call <procedure-name>[(<arg1>,<arg2>, ...)]}
IN parameter values are set using the set
methods inherited from
PreparedStatement . The type of all OUT parameters must be
registered prior to executing the stored procedure; their values
are retrieved after execution via the get
methods provided here.
A CallableStatement
can return one ResultSet object or
multiple ResultSet
objects. Multiple
ResultSet
objects are handled using operations
inherited from Statement .
For maximum portability, a call's ResultSet
objects and
update counts should be processed prior to getting the values of output
parameters.
Method from java.sql.CallableStatement Detail: |
---|
ARRAY parameter as an
java.sql.Array object in the Java programming language. |
ARRAY parameter as an
java.sql.Array object in the Java programming language. |
NUMERIC parameter as a
java.math.BigDecimal object with as many digits to the
right of the decimal point as the value contains. |
NUMERIC parameter as a
java.math.BigDecimal object with as many digits to the
right of the decimal point as the value contains. |
NUMERIC parameter as a
java.math.BigDecimal object with scale digits to
the right of the decimal point. |
BLOB parameter as a
java.sql.Blob object in the Java programming language. |
BLOB parameter as a
java.sql.Blob object in the Java programming language. |
BIT
or BOOLEAN parameter as a
boolean in the Java programming language. |
BIT or BOOLEAN
parameter as a
boolean in the Java programming language. |
TINYINT parameter
as a byte in the Java programming language. |
TINYINT parameter as a byte
in the Java programming language. |
BINARY or
VARBINARY parameter as an array of byte
values in the Java programming language. |
BINARY or VARBINARY
parameter as an array of byte values in the Java
programming language. |
java.io.Reader object in the Java programming language. |
java.io.Reader object in the Java programming language. |
CLOB parameter as a
java.sql.Clob object in the Java programming language. |
CLOB parameter as a
java.sql.Clob object in the Java programming language. |
DATE parameter as a
java.sql.Date object. |
DATE parameter as a
java.sql.Date object. |
DATE parameter as a
java.sql.Date object, using
the given Calendar object
to construct the date.
With a Calendar object, the driver
can calculate the date taking into account a custom timezone and locale.
If no Calendar object is specified, the driver uses the
default timezone and locale. |
DATE parameter as a
java.sql.Date object, using
the given Calendar object
to construct the date.
With a Calendar object, the driver
can calculate the date taking into account a custom timezone and locale.
If no Calendar object is specified, the driver uses the
default timezone and locale. |
DOUBLE parameter as a double
in the Java programming language. |
DOUBLE parameter as a double
in the Java programming language. |
FLOAT parameter
as a float in the Java programming language. |
FLOAT parameter as a float
in the Java programming language. |
INTEGER parameter
as an int in the Java programming language. |
INTEGER parameter as an int
in the Java programming language. |
BIGINT parameter
as a long in the Java programming language. |
BIGINT parameter as a long
in the Java programming language. |
java.io.Reader object in the Java programming language.
It is intended for use when
accessing NCHAR ,NVARCHAR
and LONGNVARCHAR parameters. |
java.io.Reader object in the Java programming language.
It is intended for use when
accessing NCHAR ,NVARCHAR
and LONGNVARCHAR parameters. |
NCLOB parameter as a
java.sql.NClob object in the Java programming language. |
NCLOB parameter as a
java.sql.NClob object in the Java programming language. |
NCHAR ,
NVARCHAR
or LONGNVARCHAR parameter as
a String in the Java programming language.
For the fixed-length type JDBC |
NCHAR ,
NVARCHAR
or LONGNVARCHAR parameter as
a String in the Java programming language.
For the fixed-length type JDBC |
Object
in the Java programming language. If the value is an SQL NULL ,
the driver returns a Java null .
This method returns a Java object whose type corresponds to the JDBC
type that was registered for this parameter using the method
|
Object in the Java
programming language. If the value is an SQL NULL , the
driver returns a Java null .
This method returns a Java object whose type corresponds to the JDBC
type that was registered for this parameter using the method
|
parameterIndex and uses map for the custom
mapping of the parameter value.
This method returns a Java object whose type corresponds to the
JDBC type that was registered for this parameter using the method
|
parameterName and uses map for the custom
mapping of the parameter value.
This method returns a Java object whose type corresponds to the
JDBC type that was registered for this parameter using the method
|
Returns an object representing the value of OUT parameter
{@code parameterIndex} and will convert from the
SQL type of the parameter to the requested Java data type, if the
conversion is supported. If the conversion is not
supported or null is specified for the type, a
At a minimum, an implementation must support the conversions defined in Appendix B, Table B-3 and conversion of appropriate user defined SQL types to a Java type which implements {@code SQLData}, or {@code Struct}. Additional conversions may be supported and are vendor defined. |
Returns an object representing the value of OUT parameter
{@code parameterName} and will convert from the
SQL type of the parameter to the requested Java data type, if the
conversion is supported. If the conversion is not
supported or null is specified for the type, a
At a minimum, an implementation must support the conversions defined in Appendix B, Table B-3 and conversion of appropriate user defined SQL types to a Java type which implements {@code SQLData}, or {@code Struct}. Additional conversions may be supported and are vendor defined. |
REF(<structured-type>)
parameter as a java.sql.Ref object in the Java programming language. |
REF(<structured-type>)
parameter as a java.sql.Ref object in the Java programming language. |
ROWID parameter as a
java.sql.RowId object. |
ROWID parameter as a
java.sql.RowId object. |
SQL XML parameter as a
java.sql.SQLXML object in the Java programming language. |
SQL XML parameter as a
java.sql.SQLXML object in the Java programming language. |
SMALLINT parameter
as a short in the Java programming language. |
SMALLINT parameter as a short
in the Java programming language. |
CHAR ,
VARCHAR , or LONGVARCHAR parameter as a
String in the Java programming language.
For the fixed-length type JDBC |
CHAR , VARCHAR ,
or LONGVARCHAR parameter as a String in
the Java programming language.
For the fixed-length type JDBC |
TIME parameter as a
java.sql.Time object. |
TIME parameter as a
java.sql.Time object. |
TIME parameter as a
java.sql.Time object, using
the given Calendar object
to construct the time.
With a Calendar object, the driver
can calculate the time taking into account a custom timezone and locale.
If no Calendar object is specified, the driver uses the
default timezone and locale. |
TIME parameter as a
java.sql.Time object, using
the given Calendar object
to construct the time.
With a Calendar object, the driver
can calculate the time taking into account a custom timezone and locale.
If no Calendar object is specified, the driver uses the
default timezone and locale. |
TIMESTAMP parameter as a
java.sql.Timestamp object. |
TIMESTAMP parameter as a
java.sql.Timestamp object. |
TIMESTAMP parameter as a
java.sql.Timestamp object, using
the given Calendar object to construct
the Timestamp object.
With a Calendar object, the driver
can calculate the timestamp taking into account a custom timezone and locale.
If no Calendar object is specified, the driver uses the
default timezone and locale. |
TIMESTAMP parameter as a
java.sql.Timestamp object, using
the given Calendar object to construct
the Timestamp object.
With a Calendar object, the driver
can calculate the timestamp taking into account a custom timezone and locale.
If no Calendar object is specified, the driver uses the
default timezone and locale. |
DATALINK parameter as a
java.net.URL object. |
DATALINK parameter as a
java.net.URL object. |
parameterIndex to the JDBC type
sqlType . All OUT parameters must be registered
before a stored procedure is executed.
The JDBC type specified by
If the JDBC type expected to be returned to this output parameter
is specific to this particular database, |
parameterName to the JDBC type
sqlType . All OUT parameters must be registered
before a stored procedure is executed.
The JDBC type specified by
If the JDBC type expected to be returned to this output parameter
is specific to this particular database, |
parameterIndex to be of JDBC type
sqlType . All OUT parameters must be registered
before a stored procedure is executed.
The JDBC type specified by
This version of |
registerOutParameter
should be used for a user-defined or REF output parameter. Examples
of user-defined types include: STRUCT , DISTINCT ,
JAVA_OBJECT , and named array types.
All OUT parameters must be registered before a stored procedure is executed. For a user-defined parameter, the fully-qualified SQL
type name of the parameter should also be given, while a Note: When reading the value of an out parameter, you must use the getter method whose Java type corresponds to the parameter's registered SQL type. |
parameterName to be of JDBC type
sqlType . All OUT parameters must be registered
before a stored procedure is executed.
The JDBC type specified by
This version of |
registerOutParameter
should be used for a user-named or REF output parameter. Examples
of user-named types include: STRUCT, DISTINCT, JAVA_OBJECT, and
named array types.
All OUT parameters must be registered before a stored procedure is executed. For a user-named parameter the fully-qualified SQL type name of the parameter should also be given, while a REF parameter requires that the fully-qualified type name of the referenced type be given. A JDBC driver that does not need the type code and type name information may ignore it. To be portable, however, applications should always provide these values for user-named and REF parameters. Although it is intended for user-named and REF parameters, this method may be used to register a parameter of any JDBC type. If the parameter does not have a user-named or REF type, the typeName parameter is ignored. Note: When reading the value of an out parameter, you
must use the |
LONGVARCHAR
parameter, it may be more practical to send it via a
java.io.InputStream . Data will be read from the stream
as needed until end-of-file is reached. The JDBC driver will
do any necessary conversion from ASCII to the database char format.
Note: This stream object can either be a standard Java stream object or your own subclass that implements the standard interface. Note: Consult your JDBC driver documentation to determine if
it might be more efficient to use a version of
|
LONGVARCHAR
parameter, it may be more practical to send it via a
java.io.InputStream . Data will be read from the stream
as needed until end-of-file is reached. The JDBC driver will
do any necessary conversion from ASCII to the database char format.
Note: This stream object can either be a standard Java stream object or your own subclass that implements the standard interface. |
LONGVARCHAR
parameter, it may be more practical to send it via a
java.io.InputStream . Data will be read from the stream
as needed until end-of-file is reached. The JDBC driver will
do any necessary conversion from ASCII to the database char format.
Note: This stream object can either be a standard Java stream object or your own subclass that implements the standard interface. |
java.math.BigDecimal value.
The driver converts this to an SQL NUMERIC value when
it sends it to the database. |
LONGVARBINARY
parameter, it may be more practical to send it via a
java.io.InputStream object. The data will be read from the
stream as needed until end-of-file is reached.
Note: This stream object can either be a standard Java stream object or your own subclass that implements the standard interface. Note: Consult your JDBC driver documentation to determine if
it might be more efficient to use a version of
|
LONGVARBINARY
parameter, it may be more practical to send it via a
java.io.InputStream object. The data will be read from the stream
as needed until end-of-file is reached.
Note: This stream object can either be a standard Java stream object or your own subclass that implements the standard interface. |
LONGVARBINARY
parameter, it may be more practical to send it via a
java.io.InputStream object. The data will be read from the stream
as needed until end-of-file is reached.
Note: This stream object can either be a standard Java stream object or your own subclass that implements the standard interface. |
java.sql.Blob object.
The driver converts this to an SQL BLOB value when it
sends it to the database. |
InputStream object.
This method differs from the setBinaryStream (int, InputStream)
method because it informs the driver that the parameter value should be
sent to the server as a BLOB . When the setBinaryStream method is used,
the driver may have to do extra work to determine whether the parameter
data should be send to the server as a LONGVARBINARY or a BLOB
Note: Consult your JDBC driver documentation to determine if
it might be more efficient to use a version of
|
InputStream object. The inputstream must contain the number
of characters specified by length, otherwise a SQLException will be
generated when the CallableStatement is executed.
This method differs from the setBinaryStream (int, InputStream, int)
method because it informs the driver that the parameter value should be
sent to the server as a BLOB . When the setBinaryStream method is used,
the driver may have to do extra work to determine whether the parameter
data should be sent to the server as a LONGVARBINARY or a BLOB |
boolean value.
The driver converts this
to an SQL BIT or BOOLEAN value when it sends it to the database. |
byte value.
The driver converts this
to an SQL TINYINT value when it sends it to the database. |
VARBINARY or
LONGVARBINARY (depending on the argument's size relative
to the driver's limits on VARBINARY values) when it sends
it to the database. |
Reader
object.
When a very large UNICODE value is input to a LONGVARCHAR
parameter, it may be more practical to send it via a
java.io.Reader object. The data will be read from the stream
as needed until end-of-file is reached. The JDBC driver will
do any necessary conversion from UNICODE to the database char format.
Note: This stream object can either be a standard Java stream object or your own subclass that implements the standard interface. Note: Consult your JDBC driver documentation to determine if
it might be more efficient to use a version of
|
Reader
object, which is the given number of characters long.
When a very large UNICODE value is input to a LONGVARCHAR
parameter, it may be more practical to send it via a
java.io.Reader object. The data will be read from the stream
as needed until end-of-file is reached. The JDBC driver will
do any necessary conversion from UNICODE to the database char format.
Note: This stream object can either be a standard Java stream object or your own subclass that implements the standard interface. |
Reader
object, which is the given number of characters long.
When a very large UNICODE value is input to a LONGVARCHAR
parameter, it may be more practical to send it via a
java.io.Reader object. The data will be read from the stream
as needed until end-of-file is reached. The JDBC driver will
do any necessary conversion from UNICODE to the database char format.
Note: This stream object can either be a standard Java stream object or your own subclass that implements the standard interface. |
java.sql.Clob object.
The driver converts this to an SQL CLOB value when it
sends it to the database. |
Reader object.
This method differs from the setCharacterStream (int, Reader) method
because it informs the driver that the parameter value should be sent to
the server as a CLOB . When the setCharacterStream method is used, the
driver may have to do extra work to determine whether the parameter
data should be send to the server as a LONGVARCHAR or a CLOB
Note: Consult your JDBC driver documentation to determine if
it might be more efficient to use a version of
|
Reader object. The reader must contain the number
of characters specified by length otherwise a SQLException will be
generated when the CallableStatement is executed.
This method differs from the setCharacterStream (int, Reader, int) method
because it informs the driver that the parameter value should be sent to
the server as a CLOB . When the setCharacterStream method is used, the
driver may have to do extra work to determine whether the parameter
data should be send to the server as a LONGVARCHAR or a CLOB |
java.sql.Date value
using the default time zone of the virtual machine that is running
the application.
The driver converts this
to an SQL DATE value when it sends it to the database. |
java.sql.Date value,
using the given Calendar object. The driver uses
the Calendar object to construct an SQL DATE value,
which the driver then sends to the database. With a
a Calendar object, the driver can calculate the date
taking into account a custom timezone. If no
Calendar object is specified, the driver uses the default
timezone, which is that of the virtual machine running the application. |
double value.
The driver converts this
to an SQL DOUBLE value when it sends it to the database. |
float value.
The driver converts this
to an SQL FLOAT value when it sends it to the database. |
int value.
The driver converts this
to an SQL INTEGER value when it sends it to the database. |
long value.
The driver converts this
to an SQL BIGINT value when it sends it to the database. |
Reader object. The
Reader reads the data till end-of-file is reached. The
driver does the necessary conversion from Java character format to
the national character set in the database.
Note: This stream object can either be a standard Java stream object or your own subclass that implements the standard interface. Note: Consult your JDBC driver documentation to determine if
it might be more efficient to use a version of
|
Reader object. The
Reader reads the data till end-of-file is reached. The
driver does the necessary conversion from Java character format to
the national character set in the database. |
java.sql.NClob object. The object
implements the java.sql.NClob interface. This NClob
object maps to a SQL NCLOB . |
Reader object.
This method differs from the setCharacterStream (int, Reader) method
because it informs the driver that the parameter value should be sent to
the server as a NCLOB . When the setCharacterStream method is used, the
driver may have to do extra work to determine whether the parameter
data should be send to the server as a LONGNVARCHAR or a NCLOB
Note: Consult your JDBC driver documentation to determine if
it might be more efficient to use a version of
|
Reader object. The reader must contain the number
of characters specified by length otherwise a SQLException will be
generated when the CallableStatement is executed.
This method differs from the setCharacterStream (int, Reader, int) method
because it informs the driver that the parameter value should be sent to
the server as a NCLOB . When the setCharacterStream method is used, the
driver may have to do extra work to determine whether the parameter
data should be send to the server as a LONGNVARCHAR or a NCLOB |
String object.
The driver converts this to a SQL NCHAR or
NVARCHAR or LONGNVARCHAR |
NULL .
Note: You must specify the parameter's SQL type. |
NULL .
This version of the method setNull should
be used for user-defined types and REF type parameters. Examples
of user-defined types include: STRUCT, DISTINCT, JAVA_OBJECT, and
named array types.
Note: To be portable, applications must give the SQL type code and the fully-qualified SQL type name when specifying a NULL user-defined or REF parameter. In the case of a user-defined type the name is the type name of the parameter itself. For a REF parameter, the name is the type name of the referenced type. Although it is intended for user-defined and Ref parameters, this method may be used to set a null parameter of any JDBC type. If the parameter does not have a user-defined or REF type, the given typeName is ignored. |
Object ; therefore, the
java.lang equivalent objects should be used for built-in types.
The JDBC specification specifies a standard mapping from
Java Note that this method may be used to pass datatabase-
specific abstract data types, by using a driver-specific Java
type.
If the object is of a class implementing the interface This method throws an exception if there is an ambiguity, for example, if the object is of a class implementing more than one of the interfaces named above.
Note: Not all databases allow for a non-typed Null to be sent to
the backend. For maximum portability, the |
setObject
above, except that it assumes a scale of zero. |
java.lang equivalent objects should be used.
The given Java object will be converted to the given targetSqlType
before being sent to the database.
If the object has a custom mapping (is of a class implementing the
interface Note that this method may be used to pass datatabase- specific abstract data types. |
java.sql.RowId object. The
driver converts this to a SQL ROWID when it sends it to the
database. |
java.sql.SQLXML object. The driver converts this to an
SQL XML value when it sends it to the database. |
short value.
The driver converts this
to an SQL SMALLINT value when it sends it to the database. |
String value.
The driver converts this
to an SQL VARCHAR or LONGVARCHAR value
(depending on the argument's
size relative to the driver's limits on VARCHAR values)
when it sends it to the database. |
java.sql.Time value.
The driver converts this
to an SQL TIME value when it sends it to the database. |
java.sql.Time value,
using the given Calendar object. The driver uses
the Calendar object to construct an SQL TIME value,
which the driver then sends to the database. With a
a Calendar object, the driver can calculate the time
taking into account a custom timezone. If no
Calendar object is specified, the driver uses the default
timezone, which is that of the virtual machine running the application. |
java.sql.Timestamp value.
The driver
converts this to an SQL TIMESTAMP value when it sends it to the
database. |
java.sql.Timestamp value,
using the given Calendar object. The driver uses
the Calendar object to construct an SQL TIMESTAMP value,
which the driver then sends to the database. With a
a Calendar object, the driver can calculate the timestamp
taking into account a custom timezone. If no
Calendar object is specified, the driver uses the default
timezone, which is that of the virtual machine running the application. |
java.net.URL object.
The driver converts this to an SQL DATALINK value when
it sends it to the database. |
NULL . Note that this method should be called only after
calling a getter method; otherwise, there is no value to use in
determining whether it is null or not. |