setObject(String parameterName, Object x, int targetSqlType)
Syntax:
void setObject(String parameterName, Object x, int targetSqlType) throws SQLException
Description:
Sets the value of the designated parameter with the given object. This method is like the method setObject above, except that it assumes a scale of zero.
Parameters:
parameterName
the name of the parameter
x
the parameter value
targetSqlType
the SQL type (as defined in java.sql.Types) to be sent to the database
Throws:
SQLException - if a database access error occurs, parameterName is not a valid parameter name, x is ambiguous or not a valid database type, or the prepared statement has been closed
SQLFeatureNotSupportedException - if targetSqlType is a ARRAY
, DATALINK
, JAVA_OBJECT
, REF
, ROWID
, SQLXML
, or STRUCT
.
Reference:
For more information, reference JDBC documentation for: CallableStatement.setObject(String, Object, int)