| title | setObject Method (int, java.lang.Object, int) |
|---|---|
| description | setObject Method (int, java.lang.Object, int) |
| author | David-Engel |
| ms.author | davidengel |
| ms.date | 01/19/2017 |
| ms.service | sql |
| ms.subservice | connectivity |
| ms.topic | reference |
| apilocation | sqljdbc.jar |
| apiname | SQLServerPreparedStatement.setObject (int, java.lang.Object, int) |
| apitype | Assembly |
[!INCLUDEDriver_JDBC_Download]
Sets the value of the designated parameter by using the given object and target type.
public final void setObject(int n,
java.lang.Object obj,
int targetSqlType)
n
An int that indicates the parameter number.
obj
An object.
targetSqlType
An int that indicates the target type as defined in java.sql.Types.
This setObject method is specified by the setObject method in the java.sql.PreparedStatement interface.
Beginning with [!INCLUDEssNoVersion] JDBC Driver 3.0, the behavior of this method is modified by the sendTimeAsDatetime connection property (Setting the Connection Properties) and SQLServerDataSource.setSendTimeAsDatetime.
For more information, see Configuring How java.sql.Time Values are Sent to the Server.
setObject Method (SQLServerPreparedStatement)
SQLServerPreparedStatement Members
SQLServerPreparedStatement Class