- parameterIndex
- the parameter number index, where the first parameter has index 1.
- theObject
- the object containing the value to which the parameter at parameterIndex is set.
Type Reason Java.Sql.SQLException if a database error happens.
Sets the value of a specified parameter using a supplied object.
There is a standard mapping from Java types to SQL types, defined in the JDBC specification. The passed object is then transformed into the appropriate SQL type, and then transferred to the database. setObject can be used to pass abstract data types unique to the database, by using a JDBC driver specific Java type. If the object's class implements the interface SQLData, the JDBC driver calls SQLData.writeSQL to write it to the SQL data stream. If the object's class implements Ref, Blob, Clob, Struct, or Array, the driver passes it to the database as a value of the corresponding SQL type.