java.sql

Interface CallableStatement

public interface CallableStatement extends PreparedStatement

This interface provides a mechanism for calling stored procedures.
Method Summary
ArraygetArray(int index)
This method returns the value of the specified parameter as a Java Array.
ArraygetArray(String name)
This method returns the value of the specified parameter as a Java Array.
BigDecimalgetBigDecimal(int index, int scale)
This method returns the value of the specified parameter as a Java BigDecimal.
BigDecimalgetBigDecimal(int index)
This method returns the value of the specified parameter as a Java BigDecimal.
BigDecimalgetBigDecimal(String name)
This method returns the value of the specified parameter as a Java BigDecimal.
BlobgetBlob(int index)
This method returns the value of the specified parameter as a Java Blob.
BlobgetBlob(String name)
This method returns the value of the specified parameter as a Java Blob.
booleangetBoolean(int index)
This method returns the value of the specified parameter as a Java boolean.
booleangetBoolean(String name)
This method returns the value of the specified parameter as a Java boolean.
bytegetByte(int index)
This method returns the value of the specified parameter as a Java byte.
bytegetByte(String name)
This method returns the value of the specified parameter as a Java byte.
byte[]getBytes(int index)
This method returns the value of the specified parameter as a Java byte array.
byte[]getBytes(String name)
This method returns the value of the specified parameter as a Java byte array.
ClobgetClob(int index)
This method returns the value of the specified parameter as a Java Clob.
ClobgetClob(String name)
This method returns the value of the specified parameter as a Java Clob.
DategetDate(int index)
This method returns the value of the specified parameter as a Java java.sql.Date.
DategetDate(int index, Calendar cal)
This method returns the value of the specified parameter as a Java java.sql.Date.
DategetDate(String name)
This method returns the value of the specified parameter as a Java java.sql.Date.
DategetDate(String name, Calendar cal)
This method returns the value of the specified parameter as a Java java.sql.Date.
doublegetDouble(int index)
This method returns the value of the specified parameter as a Java double.
doublegetDouble(String name)
This method returns the value of the specified parameter as a Java double.
floatgetFloat(int index)
This method returns the value of the specified parameter as a Java float.
floatgetFloat(String name)
This method returns the value of the specified parameter as a Java float.
intgetInt(int index)
This method returns the value of the specified parameter as a Java int.
intgetInt(String name)
This method returns the value of the specified parameter as a Java int.
longgetLong(int index)
This method returns the value of the specified parameter as a Java long.
longgetLong(String name)
This method returns the value of the specified parameter as a Java long.
ObjectgetObject(int index)
This method returns the value of the specified parameter as a Java Object.
ObjectgetObject(int index, Map<String,Class<?>> map)
This method returns the value of the specified parameter as a Java Object.
ObjectgetObject(String name)
This method returns the value of the specified parameter as a Java Object.
ObjectgetObject(String name, Map<String,Class<?>> map)
This method returns the value of the specified parameter as a Java Object using the specified mapping for conversion from SQL to Java types.
RefgetRef(int index)
This method returns the value of the specified parameter as a Java Ref.
RefgetRef(String name)
This method returns the value of the specified parameter as a Java Ref.
shortgetShort(int index)
This method returns the value of the specified parameter as a Java short.
shortgetShort(String name)
This method returns the value of the specified parameter as a Java short.
StringgetString(int index)
This method returns the value of the specified parameter as a Java String.
StringgetString(String name)
This method returns the value of the specified parameter as a Java String.
TimegetTime(int index)
This method returns the value of the specified parameter as a Java java.sql.Time.
TimegetTime(int index, Calendar cal)
This method returns the value of the specified parameter as a Java java.sql.Time.
TimegetTime(String name)
This method returns the value of the specified parameter as a Java java.sql.Time.
TimegetTime(String name, Calendar cal)
This method returns the value of the specified parameter as a Java java.sql.Time.
TimestampgetTimestamp(int index)
This method returns the value of the specified parameter as a Java java.sql.Timestamp.
TimestampgetTimestamp(int index, Calendar cal)
This method returns the value of the specified parameter as a Java java.sql.Timestamp.
TimestampgetTimestamp(String name)
This method returns the value of the specified parameter as a Java java.sql.Timestamp.
TimestampgetTimestamp(String name, Calendar cal)
This method returns the value of the specified parameter as a Java java.sql.Timestamp.
URLgetURL(int index)
This method returns the value of the specified parameter as a Java java.net.URL.
URLgetURL(String name)
This method returns the value of the specified parameter as a Java java.net.URL.
voidregisterOutParameter(int index, int sqlType)
This method registers the specified parameter as an output parameter of the specified SQL type.
voidregisterOutParameter(int index, int sqlType, int scale)
This method registers the specified parameter as an output parameter of the specified SQL type and scale.
voidregisterOutParameter(int index, int sqlType, String typeName)
This method registers the specified parameter as an output parameter of the specified SQL type.
voidregisterOutParameter(String name, int sqlType)
This method registers the specified parameter as an output parameter of the specified SQL type.
voidregisterOutParameter(String name, int sqlType, int scale)
This method registers the specified parameter as an output parameter of the specified SQL type.
voidregisterOutParameter(String name, int sqlType, String typeName)
This method registers the specified parameter as an output parameter of the specified SQL type.
voidsetAsciiStream(String name, InputStream stream, int count)
This method sets the specified parameter from the given Java ASCII InputStream value.
voidsetBigDecimal(String name, BigDecimal value)
This method sets the specified parameter from the given Java BigDecimal value.
voidsetBinaryStream(String name, InputStream stream, int count)
This method sets the specified parameter from the given Java binary InputStream value.
voidsetBoolean(String name, boolean value)
This method sets the specified parameter from the given Java boolean value.
voidsetByte(String name, byte value)
This method sets the specified parameter from the given Java byte value.
voidsetBytes(String name, byte[] value)
This method sets the specified parameter from the given Java byte array value.
voidsetCharacterStream(String name, Reader reader, int count)
This method sets the specified parameter from the given Java character Reader value.
voidsetDate(String name, Date value)
This method sets the specified parameter from the given Java java.sql.Date value.
voidsetDate(String name, Date value, Calendar cal)
This method sets the specified parameter from the given Java java.sql.Date value.
voidsetDouble(String name, double value)
This method sets the specified parameter from the given Java double value.
voidsetFloat(String name, float value)
This method sets the specified parameter from the given Java float value.
voidsetInt(String name, int value)
This method sets the specified parameter from the given Java int value.
voidsetLong(String name, long value)
This method sets the specified parameter from the given Java long value.
voidsetNull(String name, int sqlType)
This method populates the specified parameter with a SQL NULL value for the specified type.
voidsetNull(String name, int sqlType, String typeName)
This method populates the specified parameter with a SQL NULL value for the specified type.
voidsetObject(String name, Object value, int sqlType, int scale)
This method sets the specified parameter from the given Java Object value.
voidsetObject(String name, Object value, int sqlType)
This method sets the specified parameter from the given Java Object value.
voidsetObject(String name, Object value)
This method sets the specified parameter from the given Java Object value.
voidsetShort(String name, short value)
This method sets the specified parameter from the given Java short value.
voidsetString(String name, String value)
This method sets the specified parameter from the given Java String value.
voidsetTime(String name, Time value)
This method sets the specified parameter from the given Java java.sql.Time value.
voidsetTime(String name, Time value, Calendar cal)
This method sets the specified parameter from the given Java java.sql.Time value.
voidsetTimestamp(String name, Timestamp value)
This method sets the specified parameter from the given Java java.sql.Timestamp value.
voidsetTimestamp(String name, Timestamp value, Calendar cal)
This method sets the specified parameter from the given Java java.sql.Timestamp value.
voidsetURL(String name, URL value)
This method sets the value of the specified parameter to the specified java.net.URL
booleanwasNull()
This method tests whether the value of the last parameter that was fetched was actually a SQL NULL value.

Method Detail

getArray

public Array getArray(int index)
This method returns the value of the specified parameter as a Java Array.

Parameters: index The index of the parameter to return.

Returns: The parameter value as a Array.

Throws: SQLException If an error occurs.

Since: 1.2

getArray

public Array getArray(String name)
This method returns the value of the specified parameter as a Java Array.

Parameters: name The name of the parameter to return.

Returns: The parameter value as a Array.

Throws: SQLException If an error occurs.

Since: 1.4

getBigDecimal

public BigDecimal getBigDecimal(int index, int scale)

Deprecated: Use getBigDecimal(int index) or getBigDecimal(String name) instead.

This method returns the value of the specified parameter as a Java BigDecimal.

Parameters: index The index of the parameter to return. scale The number of digits to the right of the decimal to return.

Returns: The parameter value as a BigDecimal.

Throws: SQLException If an error occurs.

getBigDecimal

public BigDecimal getBigDecimal(int index)
This method returns the value of the specified parameter as a Java BigDecimal.

Parameters: index The index of the parameter to return.

Returns: The parameter value as a BigDecimal.

Throws: SQLException If an error occurs.

Since: 1.2

getBigDecimal

public BigDecimal getBigDecimal(String name)
This method returns the value of the specified parameter as a Java BigDecimal.

Parameters: name The name of the parameter to return.

Returns: The parameter value as a BigDecimal.

Throws: SQLException If an error occurs.

Since: 1.4

getBlob

public Blob getBlob(int index)
This method returns the value of the specified parameter as a Java Blob.

Parameters: index The index of the parameter to return.

Returns: The parameter value as a Blob.

Throws: SQLException If an error occurs.

Since: 1.2

getBlob

public Blob getBlob(String name)
This method returns the value of the specified parameter as a Java Blob.

Parameters: name The name of the parameter to return.

Returns: The parameter value as a Blob.

Throws: SQLException If an error occurs.

Since: 1.4

getBoolean

public boolean getBoolean(int index)
This method returns the value of the specified parameter as a Java boolean.

Parameters: index The index of the parameter to return.

Returns: The parameter value as a boolean.

Throws: SQLException If an error occurs.

getBoolean

public boolean getBoolean(String name)
This method returns the value of the specified parameter as a Java boolean.

Parameters: name The name of the parameter to return.

Returns: The parameter value as a boolean.

Throws: SQLException If an error occurs.

Since: 1.4

getByte

public byte getByte(int index)
This method returns the value of the specified parameter as a Java byte.

Parameters: index The index of the parameter to return.

Returns: The parameter value as a byte.

Throws: SQLException If an error occurs.

getByte

public byte getByte(String name)
This method returns the value of the specified parameter as a Java byte.

Parameters: name The name of the parameter to return.

Returns: The parameter value as a byte.

Throws: SQLException If an error occurs.

Since: 1.4

getBytes

public byte[] getBytes(int index)
This method returns the value of the specified parameter as a Java byte array.

Parameters: index The index of the parameter to return.

Returns: The parameter value as a byte array

Throws: SQLException If an error occurs.

getBytes

public byte[] getBytes(String name)
This method returns the value of the specified parameter as a Java byte array.

Parameters: name The name of the parameter to return.

Returns: The parameter value as a byte[].

Throws: SQLException If an error occurs.

Since: 1.4

getClob

public Clob getClob(int index)
This method returns the value of the specified parameter as a Java Clob.

Parameters: index The index of the parameter to return.

Returns: The parameter value as a Clob.

Throws: SQLException If an error occurs.

Since: 1.2

getClob

public Clob getClob(String name)
This method returns the value of the specified parameter as a Java Clob.

Parameters: name The name of the parameter to return.

Returns: The parameter value as a Clob.

Throws: SQLException If an error occurs.

Since: 1.4

getDate

public Date getDate(int index)
This method returns the value of the specified parameter as a Java java.sql.Date.

Parameters: index The index of the parameter to return.

Returns: The parameter value as a java.sql.Date.

Throws: SQLException If an error occurs.

getDate

public Date getDate(int index, Calendar cal)
This method returns the value of the specified parameter as a Java java.sql.Date.

Parameters: index The index of the parameter to return. cal The Calendar to use for timezone and locale.

Returns: The parameter value as a java.sql.Date.

Throws: SQLException If an error occurs.

Since: 1.2

getDate

public Date getDate(String name)
This method returns the value of the specified parameter as a Java java.sql.Date.

Parameters: name The name of the parameter to return.

Returns: The parameter value as a java.sql.Date.

Throws: SQLException If an error occurs.

Since: 1.4

getDate

public Date getDate(String name, Calendar cal)
This method returns the value of the specified parameter as a Java java.sql.Date.

Parameters: name The name of the parameter to return. cal The Calendar to use for timezone and locale.

Returns: The parameter value as a java.sql.Date.

Throws: SQLException If an error occurs.

Since: 1.4

getDouble

public double getDouble(int index)
This method returns the value of the specified parameter as a Java double.

Parameters: index The index of the parameter to return.

Returns: The parameter value as a double.

Throws: SQLException If an error occurs.

getDouble

public double getDouble(String name)
This method returns the value of the specified parameter as a Java double.

Parameters: name The name of the parameter to return.

Returns: The parameter value as a double.

Throws: SQLException If an error occurs.

Since: 1.4

getFloat

public float getFloat(int index)
This method returns the value of the specified parameter as a Java float.

Parameters: index The index of the parameter to return.

Returns: The parameter value as a float.

Throws: SQLException If an error occurs.

getFloat

public float getFloat(String name)
This method returns the value of the specified parameter as a Java float.

Parameters: name The name of the parameter to return.

Returns: The parameter value as a float.

Throws: SQLException If an error occurs.

Since: 1.4

getInt

public int getInt(int index)
This method returns the value of the specified parameter as a Java int.

Parameters: index The index of the parameter to return.

Returns: The parameter value as a int.

Throws: SQLException If an error occurs.

getInt

public int getInt(String name)
This method returns the value of the specified parameter as a Java int.

Parameters: name The name of the parameter to return.

Returns: The parameter value as a int.

Throws: SQLException If an error occurs.

Since: 1.4

getLong

public long getLong(int index)
This method returns the value of the specified parameter as a Java long.

Parameters: index The index of the parameter to return.

Returns: The parameter value as a long.

Throws: SQLException If an error occurs.

getLong

public long getLong(String name)
This method returns the value of the specified parameter as a Java long.

Parameters: name The name of the parameter to return.

Returns: The parameter value as a long.

Throws: SQLException If an error occurs.

Since: 1.4

getObject

public Object getObject(int index)
This method returns the value of the specified parameter as a Java Object.

Parameters: index The index of the parameter to return.

Returns: The parameter value as an Object.

Throws: SQLException If an error occurs.

Since: 1.2

getObject

public Object getObject(int index, Map<String,Class<?>> map)
This method returns the value of the specified parameter as a Java Object.

Parameters: index The index of the parameter to return. map The mapping to use for conversion from SQL to Java types.

Returns: The parameter value as an Object.

Throws: SQLException If an error occurs.

Since: 1.2

getObject

public Object getObject(String name)
This method returns the value of the specified parameter as a Java Object.

Parameters: name The name of the parameter to return.

Returns: The parameter value as a Object.

Throws: SQLException If an error occurs.

Since: 1.4

getObject

public Object getObject(String name, Map<String,Class<?>> map)
This method returns the value of the specified parameter as a Java Object using the specified mapping for conversion from SQL to Java types.

Parameters: name The name of the parameter to return. map The mapping to use for conversion from SQL to Java types.

Returns: The parameter value as an Object.

Throws: SQLException If an error occurs.

Since: 1.4

getRef

public Ref getRef(int index)
This method returns the value of the specified parameter as a Java Ref.

Parameters: index The index of the parameter to return.

Returns: The parameter value as a Ref.

Throws: SQLException If an error occurs.

Since: 1.2

getRef

public Ref getRef(String name)
This method returns the value of the specified parameter as a Java Ref.

Parameters: name The name of the parameter to return.

Returns: The parameter value as a Ref.

Throws: SQLException If an error occurs.

Since: 1.4

getShort

public short getShort(int index)
This method returns the value of the specified parameter as a Java short.

Parameters: index The index of the parameter to return.

Returns: The parameter value as a short.

Throws: SQLException If an error occurs.

getShort

public short getShort(String name)
This method returns the value of the specified parameter as a Java short.

Parameters: name The name of the parameter to return.

Returns: The parameter value as a short.

Throws: SQLException If an error occurs.

Since: 1.4

getString

public String getString(int index)
This method returns the value of the specified parameter as a Java String.

Parameters: index The index of the parameter to return.

Returns: The parameter value as a String.

Throws: SQLException If an error occurs.

getString

public String getString(String name)
This method returns the value of the specified parameter as a Java String.

Parameters: name The name of the parameter to return.

Returns: The parameter value as a String.

Throws: SQLException If an error occurs.

Since: 1.4

getTime

public Time getTime(int index)
This method returns the value of the specified parameter as a Java java.sql.Time.

Parameters: index The index of the parameter to return.

Returns: The parameter value as a java.sql.Time.

Throws: SQLException If an error occurs.

getTime

public Time getTime(int index, Calendar cal)
This method returns the value of the specified parameter as a Java java.sql.Time.

Parameters: index The index of the parameter to return. cal The Calendar to use for timezone and locale.

Returns: The parameter value as a java.sql.Time.

Throws: SQLException If an error occurs.

Since: 1.2

getTime

public Time getTime(String name)
This method returns the value of the specified parameter as a Java java.sql.Time.

Parameters: name The name of the parameter to return.

Returns: The parameter value as a java.sql.Time.

Throws: SQLException If an error occurs.

Since: 1.4

getTime

public Time getTime(String name, Calendar cal)
This method returns the value of the specified parameter as a Java java.sql.Time.

Parameters: name The name of the parameter to return. cal The Calendar to use for timezone and locale.

Returns: The parameter value as a java.sql.Time.

Throws: SQLException If an error occurs.

Since: 1.4

getTimestamp

public Timestamp getTimestamp(int index)
This method returns the value of the specified parameter as a Java java.sql.Timestamp.

Parameters: index The index of the parameter to return.

Returns: The parameter value as a java.sql.Timestamp.

Throws: SQLException If an error occurs.

getTimestamp

public Timestamp getTimestamp(int index, Calendar cal)
This method returns the value of the specified parameter as a Java java.sql.Timestamp.

Parameters: index The index of the parameter to return.

Returns: The parameter value as a java.sql.Timestamp.

Throws: SQLException If an error occurs.

Since: 1.2

getTimestamp

public Timestamp getTimestamp(String name)
This method returns the value of the specified parameter as a Java java.sql.Timestamp.

Parameters: name The name of the parameter to return.

Returns: The parameter value as a java.sql.Timestamp.

Throws: SQLException If an error occurs.

Since: 1.4

getTimestamp

public Timestamp getTimestamp(String name, Calendar cal)
This method returns the value of the specified parameter as a Java java.sql.Timestamp.

Parameters: name The name of the parameter to return. cal The Calendar to use for timezone and locale.

Returns: The parameter value as a java.sql.Timestamp.

Throws: SQLException If an error occurs.

Since: 1.4

getURL

public URL getURL(int index)
This method returns the value of the specified parameter as a Java java.net.URL.

Parameters: index The index of the parameter to return.

Returns: The parameter value as a URL.

Throws: SQLException If an error occurs.

Since: 1.4

getURL

public URL getURL(String name)
This method returns the value of the specified parameter as a Java java.net.URL.

Parameters: name The name of the parameter to return.

Returns: The parameter value as a java.net.URL.

Throws: SQLException If an error occurs.

Since: 1.4

registerOutParameter

public void registerOutParameter(int index, int sqlType)
This method registers the specified parameter as an output parameter of the specified SQL type.

Parameters: index The index of the parameter to register as output. sqlType The SQL type value from Types.

Throws: SQLException If an error occurs.

registerOutParameter

public void registerOutParameter(int index, int sqlType, int scale)
This method registers the specified parameter as an output parameter of the specified SQL type and scale.

Parameters: index The index of the parameter to register as output. sqlType The SQL type value from Types. scale The scale of the value that will be returned.

Throws: SQLException If an error occurs.

registerOutParameter

public void registerOutParameter(int index, int sqlType, String typeName)
This method registers the specified parameter as an output parameter of the specified SQL type.

Parameters: index The index of the parameter to register as output. sqlType The SQL type value from Types. typeName The user defined data type name.

Throws: SQLException If an error occurs.

Since: 1.2

registerOutParameter

public void registerOutParameter(String name, int sqlType)
This method registers the specified parameter as an output parameter of the specified SQL type.

Parameters: name The name of the parameter to register as output. sqlType The SQL type value from Types.

Throws: SQLException If an error occurs.

Since: 1.4

registerOutParameter

public void registerOutParameter(String name, int sqlType, int scale)
This method registers the specified parameter as an output parameter of the specified SQL type. This version of registerOutParameter is used for NUMERIC or DECIMAL types.

Parameters: name The name of the parameter to register as output. sqlType The SQL type value from Types. scale Number of digits to the right of the decimal point.

Throws: SQLException If an error occurs.

Since: 1.4

registerOutParameter

public void registerOutParameter(String name, int sqlType, String typeName)
This method registers the specified parameter as an output parameter of the specified SQL type. This version of registerOutParameter is used for user-named or REF types. If the type of the output parameter does not have such a type, the typeName argument is ignored.

Parameters: name The name of the parameter to register as output. sqlType The SQL type value from Types. typeName The SQL structured type name.

Throws: SQLException If an error occurs.

Since: 1.4

setAsciiStream

public void setAsciiStream(String name, InputStream stream, int count)
This method sets the specified parameter from the given Java ASCII InputStream value.

Parameters: name The name of the parameter value to set. stream The stream from which the parameter value is read. count The number of bytes in the stream.

Throws: SQLException If an error occurs.

Since: 1.4

setBigDecimal

public void setBigDecimal(String name, BigDecimal value)
This method sets the specified parameter from the given Java BigDecimal value.

Parameters: name The name of the parameter value to set. value The value of the parameter.

Throws: SQLException If an error occurs.

Since: 1.4

setBinaryStream

public void setBinaryStream(String name, InputStream stream, int count)
This method sets the specified parameter from the given Java binary InputStream value.

Parameters: name The name of the parameter value to set. stream The stream from which the parameter value is read. count The number of bytes in the stream.

Throws: SQLException If an error occurs.

Since: 1.4

setBoolean

public void setBoolean(String name, boolean value)
This method sets the specified parameter from the given Java boolean value.

Parameters: name The name of the parameter value to set. value The value of the parameter.

Throws: SQLException If an error occurs.

Since: 1.4

setByte

public void setByte(String name, byte value)
This method sets the specified parameter from the given Java byte value.

Parameters: name The name of the parameter value to set. value The value of the parameter.

Throws: SQLException If an error occurs.

Since: 1.4

setBytes

public void setBytes(String name, byte[] value)
This method sets the specified parameter from the given Java byte array value.

Parameters: name The name of the parameter value to set. value The value of the parameter.

Throws: SQLException If an error occurs.

Since: 1.4

setCharacterStream

public void setCharacterStream(String name, Reader reader, int count)
This method sets the specified parameter from the given Java character Reader value.

Parameters: name The name of the parameter value to set. reader The reader from which the parameter value is read. count The number of characters in the stream.

Throws: SQLException If an error occurs.

Since: 1.4

setDate

public void setDate(String name, Date value)
This method sets the specified parameter from the given Java java.sql.Date value.

Parameters: name The name of the parameter value to set. value The value of the parameter.

Throws: SQLException If an error occurs.

Since: 1.4

setDate

public void setDate(String name, Date value, Calendar cal)
This method sets the specified parameter from the given Java java.sql.Date value.

Parameters: name The name of the parameter value to set. value The value of the parameter. cal The Calendar to use for timezone and locale.

Throws: SQLException If an error occurs.

Since: 1.4

setDouble

public void setDouble(String name, double value)
This method sets the specified parameter from the given Java double value.

Parameters: name The name of the parameter value to set. value The value of the parameter.

Throws: SQLException If an error occurs.

Since: 1.4

setFloat

public void setFloat(String name, float value)
This method sets the specified parameter from the given Java float value.

Parameters: name The name of the parameter value to set. value The value of the parameter.

Throws: SQLException If an error occurs.

Since: 1.4

setInt

public void setInt(String name, int value)
This method sets the specified parameter from the given Java int value.

Parameters: name The name of the parameter value to set. value The value of the parameter.

Throws: SQLException If an error occurs.

Since: 1.4

setLong

public void setLong(String name, long value)
This method sets the specified parameter from the given Java long value.

Parameters: name The name of the parameter value to set. value The value of the parameter.

Throws: SQLException If an error occurs.

Since: 1.4

setNull

public void setNull(String name, int sqlType)
This method populates the specified parameter with a SQL NULL value for the specified type.

Parameters: name The name of the parameter to set. sqlType The SQL type identifier of the parameter from Types

Throws: SQLException If an error occurs.

Since: 1.4

setNull

public void setNull(String name, int sqlType, String typeName)
This method populates the specified parameter with a SQL NULL value for the specified type.

Parameters: name The name of the parameter to set. sqlType The SQL type identifier of the parameter from Types typeName The name of the data type, for user defined types.

Throws: SQLException If an error occurs.

Since: 1.4

setObject

public void setObject(String name, Object value, int sqlType, int scale)
This method sets the specified parameter from the given Java Object value. The specified SQL object type will be used.

Parameters: name The name of the parameter value to set. value The value of the parameter. sqlType The SQL type to use for the parameter, from Types scale The scale of the value, for numeric values only.

Throws: SQLException If an error occurs.

Since: 1.4

See Also: Types

setObject

public void setObject(String name, Object value, int sqlType)
This method sets the specified parameter from the given Java Object value. The specified SQL object type will be used.

Parameters: name The name of the parameter value to set. value The value of the parameter. sqlType The SQL type to use for the parameter, from Types

Throws: SQLException If an error occurs.

Since: 1.4

See Also: Types

setObject

public void setObject(String name, Object value)
This method sets the specified parameter from the given Java Object value. The default object type to SQL type mapping will be used.

Parameters: name The name of the parameter value to set. value The value of the parameter.

Throws: SQLException If an error occurs.

Since: 1.4

setShort

public void setShort(String name, short value)
This method sets the specified parameter from the given Java short value.

Parameters: name The name of the parameter value to set. value The value of the parameter.

Throws: SQLException If an error occurs.

Since: 1.4

setString

public void setString(String name, String value)
This method sets the specified parameter from the given Java String value.

Parameters: name The name of the parameter value to set. value The value of the parameter.

Throws: SQLException If an error occurs.

Since: 1.4

setTime

public void setTime(String name, Time value)
This method sets the specified parameter from the given Java java.sql.Time value.

Parameters: name The name of the parameter value to set. value The value of the parameter.

Throws: SQLException If an error occurs.

Since: 1.4

setTime

public void setTime(String name, Time value, Calendar cal)
This method sets the specified parameter from the given Java java.sql.Time value.

Parameters: name The name of the parameter value to set. value The value of the parameter. cal The Calendar to use for timezone and locale.

Throws: SQLException If an error occurs.

Since: 1.4

setTimestamp

public void setTimestamp(String name, Timestamp value)
This method sets the specified parameter from the given Java java.sql.Timestamp value.

Parameters: name The name of the parameter value to set. value The value of the parameter.

Throws: SQLException If an error occurs.

Since: 1.4

setTimestamp

public void setTimestamp(String name, Timestamp value, Calendar cal)
This method sets the specified parameter from the given Java java.sql.Timestamp value.

Parameters: name The name of the parameter value to set. value The value of the parameter. cal The Calendar to use for timezone and locale.

Throws: SQLException If an error occurs.

Since: 1.4

setURL

public void setURL(String name, URL value)
This method sets the value of the specified parameter to the specified java.net.URL

Parameters: name The name of the parameter to set. value The value the parameter.

Since: 1.4

wasNull

public boolean wasNull()
This method tests whether the value of the last parameter that was fetched was actually a SQL NULL value.

Returns: true if the last parameter fetched was a NULL, false otherwise.

Throws: SQLException If an error occurs.