AutoCloseable
, ISQLServerStatement
, PreparedStatement
, Statement
, Wrapper
ISQLServerCallableStatement
SQLServerCallableStatement
, SQLServerPreparedStatement
public interface ISQLServerPreparedStatement extends PreparedStatement, ISQLServerStatement
SQLServerPreparedStatement
class.CLOSE_ALL_RESULTS, CLOSE_CURRENT_RESULT, EXECUTE_FAILED, KEEP_CURRENT_RESULT, NO_GENERATED_KEYS, RETURN_GENERATED_KEYS, SUCCESS_NO_INFO
Modifier and Type | Method | Description |
---|---|---|
ParameterMetaData |
getParameterMetaData(boolean forceRefresh) |
Returns parameter metadata for the prepared statement.
|
int |
getPreparedStatementHandle() |
The server handle for this prepared statement.
|
void |
setBigDecimal(int parameterIndex,
BigDecimal x,
int precision,
int scale) |
Sets the designated parameter to the given
java.math.BigDecimal value. |
void |
setBigDecimal(int parameterIndex,
BigDecimal x,
int precision,
int scale,
boolean forceEncrypt) |
Sets the designated parameter to the given
java.math.BigDecimal value. |
void |
setBoolean(int parameterIndex,
boolean x,
boolean forceEncrypt) |
Sets the designated parameter to the given Java
boolean value. |
void |
setByte(int parameterIndex,
byte x,
boolean forceEncrypt) |
Sets the designated parameter to the given Java
byte value. |
void |
setBytes(int parameterIndex,
byte[] x,
boolean forceEncrypt) |
Sets the designated parameter to the given Java array of bytes.
|
void |
setDate(int parameterIndex,
Date x,
Calendar cal,
boolean forceEncrypt) |
Sets the designated parameter to the given
java.sql.Date value, using the given Calendar object. |
void |
setDateTime(int parameterIndex,
Timestamp x) |
Sets the designated parameter to the given
java.sql.Timestamp value |
void |
setDateTime(int parameterIndex,
Timestamp x,
boolean forceEncrypt) |
Sets the designated parameter to the given
java.sql.Timestamp value |
void |
setDateTimeOffset(int parameterIndex,
DateTimeOffset x) |
Sets the designated parameter to the given
microsoft.sql.DateTimeOffset value. |
void |
setDateTimeOffset(int parameterIndex,
DateTimeOffset x,
int scale) |
Sets the designated parameter to the given
microsoft.sql.DatetimeOffset value |
void |
setDateTimeOffset(int parameterIndex,
DateTimeOffset x,
int scale,
boolean forceEncrypt) |
Sets the designated parameter to the given
microsoft.sql.DatetimeOffset value |
void |
setDouble(int parameterIndex,
double x,
boolean forceEncrypt) |
Sets the designated parameter to the given Java
double value. |
void |
setFloat(int parameterIndex,
float x,
boolean forceEncrypt) |
Sets the designated parameter to the given Java
float value. |
void |
setGeography(int parameterIndex,
Geography x) |
Sets the designated parameter to the given
microsoft.sql.Geography Class object. |
void |
setGeometry(int parameterIndex,
Geometry x) |
Sets the designated parameter to the given
microsoft.sql.Geometry Class object. |
void |
setInt(int parameterIndex,
int value,
boolean forceEncrypt) |
Sets the designated parameter to the given Java
int value. |
void |
setLong(int parameterIndex,
long x,
boolean forceEncrypt) |
Sets the designated parameter to the given Java
long value. |
void |
setMoney(int parameterIndex,
BigDecimal x) |
Sets the designated parameter to the given
java.math.BigDecimal value. |
void |
setMoney(int parameterIndex,
BigDecimal x,
boolean forceEncrypt) |
Sets the designated parameter to the given
java.math.BigDecimal value. |
void |
setNString(int parameterIndex,
String value,
boolean forceEncrypt) |
Sets the designated parameter to the given
String object. |
void |
setObject(int parameterIndex,
Object x,
int targetSqlType,
Integer precision,
int scale) |
Sets the value of the designated parameter with the given object.
|
void |
setObject(int parameterIndex,
Object x,
int targetSqlType,
Integer precision,
int scale,
boolean forceEncrypt) |
Sets the value of the designated parameter with the given object.
|
void |
setObject(int parameterIndex,
Object x,
SQLType targetSqlType,
Integer precision,
Integer scale) |
Sets the value of the designated parameter with the given object.
|
void |
setObject(int parameterIndex,
Object x,
SQLType targetSqlType,
Integer precision,
Integer scale,
boolean forceEncrypt) |
Sets the value of the designated parameter with the given object.
|
void |
setShort(int parameterIndex,
short x,
boolean forceEncrypt) |
Sets the designated parameter to the given Java
short value. |
void |
setSmallDateTime(int parameterIndex,
Timestamp x) |
Sets the designated parameter to the given
java.sql.Timestamp value |
void |
setSmallDateTime(int parameterIndex,
Timestamp x,
boolean forceEncrypt) |
Sets the designated parameter to the given
java.sql.Timestamp value |
void |
setSmallMoney(int parameterIndex,
BigDecimal x) |
Sets the designated parameter to the given
java.math.BigDecimal value. |
void |
setSmallMoney(int parameterIndex,
BigDecimal x,
boolean forceEncrypt) |
Sets the designated parameter to the given
java.math.BigDecimal value. |
void |
setString(int parameterIndex,
String str,
boolean forceEncrypt) |
Sets the designated parameter to the given Java
String value. |
void |
setStructured(int parameterIndex,
String tvpName,
ISQLServerDataRecord tvpBulkRecord) |
Populates a table valued parameter with a data table
|
void |
setStructured(int parameterIndex,
String tvpName,
SQLServerDataTable tvpDataTable) |
Populates a table valued parameter with a data table
|
void |
setStructured(int parameterIndex,
String tvpName,
ResultSet tvpResultSet) |
Populates a table valued parameter with a data table
|
void |
setTime(int parameterIndex,
Time x,
int scale) |
Sets the designated parameter to the given
java.sql.Time value |
void |
setTime(int parameterIndex,
Time x,
int scale,
boolean forceEncrypt) |
Sets the designated parameter to the given
java.sql.Time value |
void |
setTime(int parameterIndex,
Time x,
Calendar cal,
boolean forceEncrypt) |
Sets the designated parameter to the given
java.sql.Time value. |
void |
setTimestamp(int parameterIndex,
Timestamp x,
int scale) |
Sets the designated parameter to the given
java.sql.Timestamp value |
void |
setTimestamp(int parameterIndex,
Timestamp x,
int scale,
boolean forceEncrypt) |
Sets the designated parameter to the given
java.sql.Timestamp value |
void |
setTimestamp(int parameterIndex,
Timestamp x,
Calendar cal,
boolean forceEncrypt) |
Sets the designated parameter to the given
java.sql.Timestamp value. |
void |
setUniqueIdentifier(int parameterIndex,
String guid) |
Sets the designated parameter to the given String.
|
void |
setUniqueIdentifier(int parameterIndex,
String guid,
boolean forceEncrypt) |
Sets the designated parameter to the given String.
|
getCancelQueryTimeout, getResponseBuffering, setCancelQueryTimeout, setResponseBuffering
addBatch, clearParameters, execute, executeLargeUpdate, executeQuery, executeUpdate, getMetaData, getParameterMetaData, setArray, setAsciiStream, setAsciiStream, setAsciiStream, setBigDecimal, setBinaryStream, setBinaryStream, setBinaryStream, setBlob, setBlob, setBlob, setBoolean, setByte, setBytes, setCharacterStream, setCharacterStream, setCharacterStream, setClob, setClob, setClob, setDate, setDate, setDouble, setFloat, setInt, setLong, setNCharacterStream, setNCharacterStream, setNClob, setNClob, setNClob, setNString, setNull, setNull, setObject, setObject, setObject, setObject, setObject, setRef, setRowId, setShort, setSQLXML, setString, setTime, setTime, setTimestamp, setTimestamp, setUnicodeStream, setURL
addBatch, cancel, clearBatch, clearWarnings, close, closeOnCompletion, enquoteIdentifier, enquoteLiteral, enquoteNCharLiteral, execute, execute, execute, execute, executeBatch, executeLargeBatch, executeLargeUpdate, executeLargeUpdate, executeLargeUpdate, executeLargeUpdate, executeQuery, executeUpdate, executeUpdate, executeUpdate, executeUpdate, getConnection, getFetchDirection, getFetchSize, getGeneratedKeys, getLargeMaxRows, getLargeUpdateCount, getMaxFieldSize, getMaxRows, getMoreResults, getMoreResults, getQueryTimeout, getResultSet, getResultSetConcurrency, getResultSetHoldability, getResultSetType, getUpdateCount, getWarnings, isClosed, isCloseOnCompletion, isPoolable, isSimpleIdentifier, setCursorName, setEscapeProcessing, setFetchDirection, setFetchSize, setLargeMaxRows, setMaxFieldSize, setMaxRows, setPoolable, setQueryTimeout
isWrapperFor, unwrap
void setDateTimeOffset(int parameterIndex, DateTimeOffset x) throws SQLServerException
microsoft.sql.DateTimeOffset
value.parameterIndex
- the first parameter is 1, the second is 2, ...x
- the parameter valueSQLServerException
- if parameterIndex does not correspond to a parameter marker in the SQL statement; if a database access error occurs or this method
is called on a closed PreparedStatement
void setObject(int parameterIndex, Object x, SQLType targetSqlType, Integer precision, Integer scale) throws SQLServerException
PreparedStatement.setObject(int parameterIndex, Object x, SQLType targetSqlType, int scaleOrLength)
, except that it assumes a
scale of zero.
The default implementation will throw SQLFeatureNotSupportedException
parameterIndex
- the first parameter is 1, the second is 2, ...x
- the object containing the input parameter valuetargetSqlType
- the SQL type to be sent to the databaseprecision
- the precision of the columnscale
- the scale of the columnSQLServerException
- if parameterIndex does not correspond to a parameter marker in the SQL statement; if a database access error occurs or this method
is called on a closed PreparedStatement
void setObject(int parameterIndex, Object x, SQLType targetSqlType, Integer precision, Integer scale, boolean forceEncrypt) throws SQLServerException
PreparedStatement.setObject(int parameterIndex, Object x, SQLType targetSqlType, int scaleOrLength)
, except that it assumes a
scale of zero.
The default implementation will throw SQLFeatureNotSupportedException
parameterIndex
- the first parameter is 1, the second is 2, ...x
- the object containing the input parameter valuetargetSqlType
- the SQL type to be sent to the databaseprecision
- the precision of the columnscale
- the scale of the columnforceEncrypt
- If the boolean forceEncrypt is set to true, the query parameter will only be set if the designation column is encrypted and Always
Encrypted is enabled on the connection or on the statement. If the boolean forceEncrypt is set to false, the driver will not force
encryption on parameters.SQLServerException
- if parameterIndex does not correspond to a parameter marker in the SQL statement; if a database access error occurs or this method
is called on a closed PreparedStatement
int getPreparedStatementHandle() throws SQLServerException
SQLServerException
- when an error occursvoid setBigDecimal(int parameterIndex, BigDecimal x, int precision, int scale) throws SQLServerException
java.math.BigDecimal
value. The driver converts this to an SQL NUMERIC
value when it sends it to the database.parameterIndex
- the first parameter is 1, the second is 2, ...x
- the parameter valueprecision
- the precision of the columnscale
- the scale of the columnSQLServerException
- when an error occursvoid setBigDecimal(int parameterIndex, BigDecimal x, int precision, int scale, boolean forceEncrypt) throws SQLServerException
java.math.BigDecimal
value. The driver converts this to an SQL NUMERIC
value when it sends it to the database.parameterIndex
- the first parameter is 1, the second is 2, ...x
- the parameter valueprecision
- the precision of the columnscale
- the scale of the columnforceEncrypt
- If the boolean forceEncrypt is set to true, the query parameter will only be set if the designation column is encrypted and Always
Encrypted is enabled on the connection or on the statement. If the boolean forceEncrypt is set to false, the driver will not force
encryption on parameters.SQLServerException
- when an error occursvoid setMoney(int parameterIndex, BigDecimal x) throws SQLServerException
java.math.BigDecimal
value. The driver converts this to an SQL NUMERIC
value when it sends it to the database.parameterIndex
- the first parameter is 1, the second is 2, ...x
- the parameter valueSQLServerException
- when an error occursvoid setMoney(int parameterIndex, BigDecimal x, boolean forceEncrypt) throws SQLServerException
java.math.BigDecimal
value. The driver converts this to an SQL NUMERIC
value when it sends it to the database.parameterIndex
- the first parameter is 1, the second is 2, ...x
- the parameter valueforceEncrypt
- If the boolean forceEncrypt is set to true, the query parameter will only be set if the designation column is encrypted and Always
Encrypted is enabled on the connection or on the statement. If the boolean forceEncrypt is set to false, the driver will not force
encryption on parameters.SQLServerException
- when an error occursvoid setSmallMoney(int parameterIndex, BigDecimal x) throws SQLServerException
java.math.BigDecimal
value. The driver converts this to an SQL NUMERIC
value when it sends it to the database.parameterIndex
- the first parameter is 1, the second is 2, ...x
- the parameter valueSQLServerException
- when an error occursvoid setSmallMoney(int parameterIndex, BigDecimal x, boolean forceEncrypt) throws SQLServerException
java.math.BigDecimal
value. The driver converts this to an SQL NUMERIC
value when it sends it to the database.parameterIndex
- the first parameter is 1, the second is 2, ...x
- the parameter valueforceEncrypt
- If the boolean forceEncrypt is set to true, the query parameter will only be set if the designation column is encrypted and Always
Encrypted is enabled on the connection or on the statement. If the boolean forceEncrypt is set to false, the driver will not force
encryption on parameters.SQLServerException
- when an error occursvoid setBoolean(int parameterIndex, boolean x, boolean forceEncrypt) throws SQLServerException
boolean
value. The driver converts this to an SQL BIT
or
BOOLEAN
value when it sends it to the database.parameterIndex
- the first parameter is 1, the second is 2, ...x
- the parameter valueforceEncrypt
- If the boolean forceEncrypt is set to true, the query parameter will only be set if the designation column is encrypted and Always
Encrypted is enabled on the connection or on the statement. If the boolean forceEncrypt is set to false, the driver will not force
encryption on parameters.SQLServerException
- when an error occursvoid setByte(int parameterIndex, byte x, boolean forceEncrypt) throws SQLServerException
byte
value. The driver converts this to an SQL TINYINT
value when it
sends it to the database.parameterIndex
- the first parameter is 1, the second is 2, ...x
- the parameter valueforceEncrypt
- If the boolean forceEncrypt is set to true, the query parameter will only be set if the designation column is encrypted and Always
Encrypted is enabled on the connection or on the statement. If the boolean forceEncrypt is set to false, the driver will not force
encryption on parameters.SQLServerException
- when an error occursvoid setBytes(int parameterIndex, byte[] x, boolean forceEncrypt) throws SQLServerException
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.parameterIndex
- the first parameter is 1, the second is 2, ...x
- the parameter valueforceEncrypt
- If the boolean forceEncrypt is set to true, the query parameter will only be set if the designation column is encrypted and Always
Encrypted is enabled on the connection or on the statement. If the boolean forceEncrypt is set to false, the driver will not force
encryption on parameters.SQLServerException
- when an error occursvoid setUniqueIdentifier(int parameterIndex, String guid) throws SQLServerException
GUID
parameterIndex
- the first parameter is 1, the second is 2, ...guid
- string representation of the uniqueIdentifier valueSQLServerException
- when an error occursvoid setUniqueIdentifier(int parameterIndex, String guid, boolean forceEncrypt) throws SQLServerException
GUID
parameterIndex
- the first parameter is 1, the second is 2, ...guid
- string representation of the uniqueIdentifier valueforceEncrypt
- If the boolean forceEncrypt is set to true, the query parameter will only be set if the designation column is encrypted and Always
Encrypted is enabled on the connection or on the statement. If the boolean forceEncrypt is set to false, the driver will not force
encryption on parameters.SQLServerException
- when an error occursvoid setDouble(int parameterIndex, double x, boolean forceEncrypt) throws SQLServerException
double
value. The driver converts this to an SQL DOUBLE
value when it
sends it to the database.parameterIndex
- the first parameter is 1, the second is 2, ...x
- the parameter valueforceEncrypt
- If the boolean forceEncrypt is set to true, the query parameter will only be set if the designation column is encrypted and Always
Encrypted is enabled on the connection or on the statement. If the boolean forceEncrypt is set to false, the driver will not force
encryption on parameters.SQLServerException
- when an error occursvoid setFloat(int parameterIndex, float x, boolean forceEncrypt) throws SQLServerException
float
value. The driver converts this to an SQL REAL
value when it
sends it to the database.parameterIndex
- the first parameter is 1, the second is 2, ...x
- the parameter valueforceEncrypt
- If the boolean forceEncrypt is set to true, the query parameter will only be set if the designation column is encrypted and Always
Encrypted is enabled on the connection or on the statement. If the boolean forceEncrypt is set to false, the driver will not force
encryption on parameters.SQLServerException
- when an error occursvoid setGeometry(int parameterIndex, Geometry x) throws SQLServerException
microsoft.sql.Geometry
Class object. The driver converts this to an SQL
REAL
value when it sends it to the database.parameterIndex
- the first parameter is 1, the second is 2, ...x
- the parameter valueSQLServerException
- when an error occursvoid setGeography(int parameterIndex, Geography x) throws SQLServerException
microsoft.sql.Geography
Class object. The driver converts this to an SQL
REAL
value when it sends it to the database.parameterIndex
- the first parameter is 1, the second is 2, ...x
- the parameter valueSQLServerException
- when an error occursvoid setInt(int parameterIndex, int value, boolean forceEncrypt) throws SQLServerException
int
value. The driver converts this to an SQL INTEGER
value when it
sends it to the database.parameterIndex
- the first parameter is 1, the second is 2, ...value
- the parameter valueforceEncrypt
- If the boolean forceEncrypt is set to true, the query parameter will only be set if the designation column is encrypted and Always
Encrypted is enabled on the connection or on the statement. If the boolean forceEncrypt is set to false, the driver will not force
encryption on parameters.SQLServerException
- when an error occursvoid setLong(int parameterIndex, long x, boolean forceEncrypt) throws SQLServerException
long
value. The driver converts this to an SQL BIGINT
value when it
sends it to the database.parameterIndex
- the first parameter is 1, the second is 2, ...x
- the parameter valueforceEncrypt
- If the boolean forceEncrypt is set to true, the query parameter will only be set if the designation column is encrypted and Always
Encrypted is enabled on the connection or on the statement. If the boolean forceEncrypt is set to false, the driver will not force
encryption on parameters.SQLServerException
- when an error occursvoid setObject(int parameterIndex, Object x, int targetSqlType, Integer precision, int scale) throws SQLServerException
Sets the value of the designated parameter with the given object.
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 SQLData
), the JDBC driver should call the method
SQLData.writeSQL
to write it to the SQL data stream. If, on the other hand, the object is of a class implementing
Ref
, Blob
, Clob
, NClob
, Struct
, java.net.URL
, or
Array
, the driver should pass it to the database as a value of the corresponding SQL type.
Note that this method may be used to pass database-specific abstract data types.
parameterIndex
- the first parameter is 1, the second is 2, ...x
- the object containing the input parameter valuetargetSqlType
- the SQL type (as defined in java.sql.Types) to be sent to the database. The scale argument may further qualify this type.precision
- the precision of the columnscale
- scale of the columnSQLServerException
- when an error occursvoid setObject(int parameterIndex, Object x, int targetSqlType, Integer precision, int scale, boolean forceEncrypt) throws SQLServerException
Sets the value of the designated parameter with the given object.
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 SQLData
), the JDBC driver should call the method
SQLData.writeSQL
to write it to the SQL data stream. If, on the other hand, the object is of a class implementing
Ref
, Blob
, Clob
, NClob
, Struct
, java.net.URL
, or
Array
, the driver should pass it to the database as a value of the corresponding SQL type.
Note that this method may be used to pass database-specific abstract data types.
parameterIndex
- the first parameter is 1, the second is 2, ...x
- the object containing the input parameter valuetargetSqlType
- the SQL type (as defined in java.sql.Types) to be sent to the database. The scale argument may further qualify this type.precision
- the precision of the columnscale
- scale of the columnforceEncrypt
- If the boolean forceEncrypt is set to true, the query parameter will only be set if the designation column is encrypted and Always
Encrypted is enabled on the connection or on the statement. If the boolean forceEncrypt is set to false, the driver will not force
encryption on parameters.SQLServerException
- when an error occursvoid setShort(int parameterIndex, short x, boolean forceEncrypt) throws SQLServerException
short
value. The driver converts this to an SQL SMALLINT
value when
it sends it to the database.parameterIndex
- the first parameter is 1, the second is 2, ...x
- the parameter valueforceEncrypt
- If the boolean forceEncrypt is set to true, the query parameter will only be set if the designation column is encrypted and Always
Encrypted is enabled on the connection or on the statement. If the boolean forceEncrypt is set to false, the driver will not force
encryption on parameters.SQLServerException
- when an error occursvoid setString(int parameterIndex, String str, boolean forceEncrypt) throws SQLServerException
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.parameterIndex
- the first parameter is 1, the second is 2, ...str
- the parameter valueforceEncrypt
- If the boolean forceEncrypt is set to true, the query parameter will only be set if the designation column is encrypted and Always
Encrypted is enabled on the connection or on the statement. If the boolean forceEncrypt is set to false, the driver will not force
encryption on parameters.SQLServerException
- when an error occursvoid setNString(int parameterIndex, String value, boolean forceEncrypt) throws SQLServerException
String
object. The driver converts this to a SQL NCHAR
or
NVARCHAR
or LONGNVARCHAR
value (depending on the argument's size relative to the driver's limits on
NVARCHAR
values) when it sends it to the database.parameterIndex
- of the first parameter is 1, the second is 2, ...value
- the parameter valueforceEncrypt
- If the boolean forceEncrypt is set to true, the query parameter will only be set if the designation column is encrypted and Always
Encrypted is enabled on the connection or on the statement. If the boolean forceEncrypt is set to false, the driver will not force
encryption on parameters.SQLServerException
- when an error occursvoid setTime(int parameterIndex, Time x, int scale) throws SQLServerException
java.sql.Time
valueparameterIndex
- the first parameter is 1, the second is 2, ...x
- the parameter valuescale
- the scale of the columnSQLServerException
- when an error occursvoid setTime(int parameterIndex, Time x, int scale, boolean forceEncrypt) throws SQLServerException
java.sql.Time
valueparameterIndex
- the first parameter is 1, the second is 2, ...x
- the parameter valuescale
- the scale of the columnforceEncrypt
- If the boolean forceEncrypt is set to true, the query parameter will only be set if the designation column is encrypted and Always
Encrypted is enabled on the connection or on the statement. If the boolean forceEncrypt is set to false, the driver will not force
encryption on parameters.SQLServerException
- when an error occursvoid setTimestamp(int parameterIndex, Timestamp x, int scale) throws SQLServerException
java.sql.Timestamp
valueparameterIndex
- the first parameter is 1, the second is 2, ...x
- the parameter valuescale
- the scale of the columnSQLServerException
- when an error occursvoid setTimestamp(int parameterIndex, Timestamp x, int scale, boolean forceEncrypt) throws SQLServerException
java.sql.Timestamp
valueparameterIndex
- the first parameter is 1, the second is 2, ...x
- the parameter valuescale
- the scale of the columnforceEncrypt
- If the boolean forceEncrypt is set to true, the query parameter will only be set if the designation column is encrypted and Always
Encrypted is enabled on the connection or on the statement. If the boolean forceEncrypt is set to false, the driver will not force
encryption on parameters.SQLServerException
- when an error occursvoid setDateTimeOffset(int parameterIndex, DateTimeOffset x, int scale) throws SQLServerException
microsoft.sql.DatetimeOffset
valueparameterIndex
- the first parameter is 1, the second is 2, ...x
- the parameter valuescale
- the scale of the columnSQLServerException
- when an error occursvoid setDateTimeOffset(int parameterIndex, DateTimeOffset x, int scale, boolean forceEncrypt) throws SQLServerException
microsoft.sql.DatetimeOffset
valueparameterIndex
- the first parameter is 1, the second is 2, ...x
- the parameter valuescale
- the scale of the columnforceEncrypt
- If the boolean forceEncrypt is set to true, the query parameter will only be set if the designation column is encrypted and Always
Encrypted is enabled on the connection or on the statement. If the boolean forceEncrypt is set to false, the driver will not force
encryption on parameters.SQLServerException
- when an error occursvoid setDateTime(int parameterIndex, Timestamp x) throws SQLServerException
java.sql.Timestamp
valueparameterIndex
- the first parameter is 1, the second is 2, ...x
- the parameter valueSQLServerException
- when an error occursvoid setDateTime(int parameterIndex, Timestamp x, boolean forceEncrypt) throws SQLServerException
java.sql.Timestamp
valueparameterIndex
- the first parameter is 1, the second is 2, ...x
- the parameter valueforceEncrypt
- If the boolean forceEncrypt is set to true, the query parameter will only be set if the designation column is encrypted and Always
Encrypted is enabled on the connection or on the statement. If the boolean forceEncrypt is set to false, the driver will not force
encryption on parameters.SQLServerException
- when an error occursvoid setSmallDateTime(int parameterIndex, Timestamp x) throws SQLServerException
java.sql.Timestamp
valueparameterIndex
- the first parameter is 1, the second is 2, ...x
- the parameter valueSQLServerException
- when an error occursvoid setSmallDateTime(int parameterIndex, Timestamp x, boolean forceEncrypt) throws SQLServerException
java.sql.Timestamp
valueparameterIndex
- the first parameter is 1, the second is 2, ...x
- the parameter valueforceEncrypt
- If the boolean forceEncrypt is set to true, the query parameter will only be set if the designation column is encrypted and Always
Encrypted is enabled on the connection or on the statement. If the boolean forceEncrypt is set to false, the driver will not force
encryption on parameters.SQLServerException
- when an error occursvoid setStructured(int parameterIndex, String tvpName, SQLServerDataTable tvpDataTable) throws SQLServerException
parameterIndex
- the first parameter is 1, the second is 2, ...tvpName
- the name of the table valued parametertvpDataTable
- the source datatable objectSQLServerException
- when an error occursvoid setStructured(int parameterIndex, String tvpName, ResultSet tvpResultSet) throws SQLServerException
parameterIndex
- the first parameter is 1, the second is 2, ...tvpName
- the name of the table valued parametertvpResultSet
- the source resultset objectSQLServerException
- when an error occursvoid setStructured(int parameterIndex, String tvpName, ISQLServerDataRecord tvpBulkRecord) throws SQLServerException
parameterIndex
- the first parameter is 1, the second is 2, ...tvpName
- the name of the table valued parametertvpBulkRecord
- an ISQLServerDataRecord objectSQLServerException
- when an error occursvoid setDate(int parameterIndex, Date x, Calendar cal, boolean forceEncrypt) throws SQLServerException
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
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.parameterIndex
- the first parameter is 1, the second is 2, ...x
- the parameter valuecal
- the Calendar
object the driver will use to construct the dateforceEncrypt
- If the boolean forceEncrypt is set to true, the query parameter will only be set if the designation column is encrypted and Always
Encrypted is enabled on the connection or on the statement. If the boolean forceEncrypt is set to false, the driver will not force
encryption on parameters.SQLServerException
- when an error occursvoid setTime(int parameterIndex, Time x, Calendar cal, boolean forceEncrypt) throws SQLServerException
java.sql.Time
value. The driver converts this to an SQL TIME
value when it
sends it to the database.parameterIndex
- the first parameter is 1, the second is 2, ...x
- the parameter valuecal
- the Calendar
object the driver will use to construct the dateforceEncrypt
- If the boolean forceEncrypt is set to true, the query parameter will only be set if the designation column is encrypted and Always
Encrypted is enabled on the connection or on the statement. If the boolean forceEncrypt is set to false, the driver will not force
encryption on parameters.SQLServerException
- when an error occursvoid setTimestamp(int parameterIndex, Timestamp x, Calendar cal, boolean forceEncrypt) throws SQLServerException
java.sql.Timestamp
value. The driver converts this to an SQL TIMESTAMP
value when it sends it to the database.parameterIndex
- the first parameter is 1, the second is 2, ...x
- the parameter valuecal
- the Calendar
object the driver will use to construct the dateforceEncrypt
- If the boolean forceEncrypt is set to true, the query parameter will only be set if the designation column is encrypted and Always
Encrypted is enabled on the connection or on the statement. If the boolean forceEncrypt is set to false, the driver will not force
encryption on parameters.SQLServerException
- when an error occursParameterMetaData getParameterMetaData(boolean forceRefresh) throws SQLServerException
forceRefresh
- :
If true the cache will not be used to retrieve the metadata.SQLServerException
- when an error occursCopyright © 2018 Microsoft Corporation. All rights reserved.