Class SQLServerPreparedStatement

  • All Implemented Interfaces:
    ISQLServerPreparedStatement, ISQLServerStatement, java.io.Serializable, java.lang.AutoCloseable, java.sql.PreparedStatement, java.sql.Statement, java.sql.Wrapper
    Direct Known Subclasses:
    SQLServerCallableStatement

    public class SQLServerPreparedStatement
    extends SQLServerStatement
    implements ISQLServerPreparedStatement
    Provides an implementation of java.sql.PreparedStatement interface that assists in preparing Statements for SQL Server.

    SQLServerPreparedStatement prepares a statement using SQL Server's sp_prepexec and re-uses the returned statement handle for each subsequent execution of the statement (typically using different parameters provided by the user)

    SQLServerPreparedStatement supports batching whereby a set of prepared statements are executed in a single database round trip to improve runtime performance.

    The API javadoc for JDBC API methods that this class implements are not repeated here. Please see Sun's JDBC API interfaces javadoc for those details.

    See Also:
    Serialized Form
    • Field Summary

      • Fields inherited from interface java.sql.Statement

        CLOSE_ALL_RESULTS, CLOSE_CURRENT_RESULT, EXECUTE_FAILED, KEEP_CURRENT_RESULT, NO_GENERATED_KEYS, RETURN_GENERATED_KEYS, SUCCESS_NO_INFO
    • Method Summary

      All Methods Instance Methods Concrete Methods Deprecated Methods 
      Modifier and Type Method Description
      void addBatch()  
      void addBatch​(java.lang.String sql)  
      void clearBatch()  
      void clearParameters()  
      boolean execute()  
      boolean execute​(java.lang.String sql)  
      int[] executeBatch()
      Sends a batch of statements to the database.
      long[] executeLargeBatch()  
      long executeLargeUpdate()  
      java.sql.ResultSet executeQuery()  
      java.sql.ResultSet executeQuery​(java.lang.String sql)  
      int executeUpdate()  
      int executeUpdate​(java.lang.String sql)  
      java.sql.ResultSetMetaData getMetaData()  
      java.sql.ParameterMetaData getParameterMetaData()  
      java.sql.ParameterMetaData getParameterMetaData​(boolean forceRefresh)
      Returns parameter metadata for the prepared statement.
      int getPreparedStatementHandle()
      The server handle for this prepared statement.
      boolean getUseFmtOnly()
      Returns the current flag value for useFmtOnly.
      void setArray​(int i, java.sql.Array x)  
      void setAsciiStream​(int parameterIndex, java.io.InputStream x)  
      void setAsciiStream​(int n, java.io.InputStream x, int length)  
      void setAsciiStream​(int parameterIndex, java.io.InputStream x, long length)  
      void setBigDecimal​(int parameterIndex, java.math.BigDecimal x)  
      void setBigDecimal​(int parameterIndex, java.math.BigDecimal x, int precision, int scale)
      Sets the designated parameter to the given java.math.BigDecimal value.
      void setBigDecimal​(int parameterIndex, java.math.BigDecimal x, int precision, int scale, boolean forceEncrypt)
      Sets the designated parameter to the given java.math.BigDecimal value.
      void setBinaryStream​(int parameterIndex, java.io.InputStream x)  
      void setBinaryStream​(int n, java.io.InputStream x, int length)  
      void setBinaryStream​(int parameterIndex, java.io.InputStream x, long length)  
      void setBlob​(int parameterIndex, java.io.InputStream inputStream)  
      void setBlob​(int parameterIndex, java.io.InputStream inputStream, long length)  
      void setBlob​(int i, java.sql.Blob x)  
      void setBoolean​(int n, boolean x)  
      void setBoolean​(int n, boolean x, boolean forceEncrypt)
      Sets the designated parameter to the given Java boolean value.
      void setByte​(int n, byte x)  
      void setByte​(int n, byte x, boolean forceEncrypt)
      Sets the designated parameter to the given Java byte value.
      void setBytes​(int n, byte[] x)  
      void setBytes​(int n, byte[] x, boolean forceEncrypt)
      Sets the designated parameter to the given Java array of bytes.
      void setCharacterStream​(int parameterIndex, java.io.Reader reader)  
      void setCharacterStream​(int n, java.io.Reader reader, int length)  
      void setCharacterStream​(int parameterIndex, java.io.Reader reader, long length)  
      void setClob​(int parameterIndex, java.io.Reader reader)  
      void setClob​(int parameterIndex, java.io.Reader reader, long length)  
      void setClob​(int parameterIndex, java.sql.Clob clobValue)  
      void setDate​(int n, java.sql.Date x)  
      void setDate​(int n, java.sql.Date x, java.util.Calendar cal)  
      void setDate​(int n, java.sql.Date x, java.util.Calendar cal, boolean forceEncrypt)
      Sets the designated parameter to the given java.sql.Date value, using the given Calendar object.
      void setDateTime​(int n, java.sql.Timestamp x)
      Sets the designated parameter to the given java.sql.Timestamp value.
      void setDateTime​(int n, java.sql.Timestamp x, boolean forceEncrypt)
      Sets the designated parameter to the given java.sql.Timestamp value.
      void setDateTimeOffset​(int n, DateTimeOffset x)
      Sets the designated parameter to the given microsoft.sql.DateTimeOffset value.
      void setDateTimeOffset​(int n, DateTimeOffset x, int scale)
      Sets the designated parameter to the given microsoft.sql.DatetimeOffset value.
      void setDateTimeOffset​(int n, DateTimeOffset x, int scale, boolean forceEncrypt)
      Sets the designated parameter to the given microsoft.sql.DatetimeOffset value.
      void setDouble​(int n, double x)  
      void setDouble​(int n, double x, boolean forceEncrypt)
      Sets the designated parameter to the given Java double value.
      void setFloat​(int n, float x)  
      void setFloat​(int n, float x, boolean forceEncrypt)
      Sets the designated parameter to the given Java float value.
      void setGeography​(int n, Geography x)
      Sets the designated parameter to the given microsoft.sql.Geography Class object.
      void setGeometry​(int n, Geometry x)
      Sets the designated parameter to the given microsoft.sql.Geometry Class object.
      void setInt​(int n, int value)  
      void setInt​(int n, int value, boolean forceEncrypt)
      Sets the designated parameter to the given Java int value.
      void setLong​(int n, long x)  
      void setLong​(int n, long x, boolean forceEncrypt)
      Sets the designated parameter to the given Java long value.
      void setMoney​(int n, java.math.BigDecimal x)
      Sets the designated parameter to the given java.math.BigDecimal value.
      void setMoney​(int n, java.math.BigDecimal x, boolean forceEncrypt)
      Sets the designated parameter to the given java.math.BigDecimal value.
      void setNCharacterStream​(int parameterIndex, java.io.Reader value)  
      void setNCharacterStream​(int parameterIndex, java.io.Reader value, long length)  
      void setNClob​(int parameterIndex, java.io.Reader reader)  
      void setNClob​(int parameterIndex, java.io.Reader reader, long length)  
      void setNClob​(int parameterIndex, java.sql.NClob value)  
      void setNString​(int parameterIndex, java.lang.String value)  
      void setNString​(int parameterIndex, java.lang.String value, boolean forceEncrypt)
      Sets the designated parameter to the given String object.
      void setNull​(int index, int jdbcType)  
      void setNull​(int paramIndex, int sqlType, java.lang.String typeName)  
      void setObject​(int index, java.lang.Object obj)  
      void setObject​(int n, java.lang.Object obj, int jdbcType)  
      void setObject​(int parameterIndex, java.lang.Object x, int targetSqlType, int scaleOrLength)  
      void setObject​(int parameterIndex, java.lang.Object x, int targetSqlType, java.lang.Integer precision, int scale)
      Sets the value of the designated parameter with the given object.
      void setObject​(int parameterIndex, java.lang.Object x, int targetSqlType, java.lang.Integer precision, int scale, boolean forceEncrypt)
      Sets the value of the designated parameter with the given object.
      void setObject​(int index, java.lang.Object obj, java.sql.SQLType jdbcType)  
      void setObject​(int parameterIndex, java.lang.Object x, java.sql.SQLType targetSqlType, int scaleOrLength)  
      void setObject​(int parameterIndex, java.lang.Object x, java.sql.SQLType targetSqlType, java.lang.Integer precision, java.lang.Integer scale)
      Sets the value of the designated parameter with the given object.
      void setObject​(int parameterIndex, java.lang.Object x, java.sql.SQLType targetSqlType, java.lang.Integer precision, java.lang.Integer scale, boolean forceEncrypt)
      Sets the value of the designated parameter with the given object.
      void setRef​(int i, java.sql.Ref x)  
      void setRowId​(int parameterIndex, java.sql.RowId x)  
      void setShort​(int index, short x)  
      void setShort​(int index, short x, boolean forceEncrypt)
      Sets the designated parameter to the given Java short value.
      void setSmallDateTime​(int n, java.sql.Timestamp x)
      Sets the designated parameter to the given java.sql.Timestamp value.
      void setSmallDateTime​(int n, java.sql.Timestamp x, boolean forceEncrypt)
      Sets the designated parameter to the given java.sql.Timestamp value.
      void setSmallMoney​(int n, java.math.BigDecimal x)
      Sets the designated parameter to the given java.math.BigDecimal value.
      void setSmallMoney​(int n, java.math.BigDecimal x, boolean forceEncrypt)
      Sets the designated parameter to the given java.math.BigDecimal value.
      void setSQLXML​(int parameterIndex, java.sql.SQLXML xmlObject)  
      void setString​(int index, java.lang.String str)  
      void setString​(int index, java.lang.String str, boolean forceEncrypt)
      Sets the designated parameter to the given Java String value.
      void setStructured​(int n, java.lang.String tvpName, ISQLServerDataRecord tvpBulkRecord)
      Sets the server bulk record to populate a table valued parameter.
      void setStructured​(int n, java.lang.String tvpName, SQLServerDataTable tvpDataTable)
      Sets the data table to populates a table valued parameter.
      void setStructured​(int n, java.lang.String tvpName, java.sql.ResultSet tvpResultSet)
      Sets the result set to populate a table-valued parameter.
      void setTime​(int n, java.sql.Time x)  
      void setTime​(int n, java.sql.Time x, int scale)
      Sets the designated parameter to the given java.sql.Time value.
      void setTime​(int n, java.sql.Time x, int scale, boolean forceEncrypt)
      Sets the designated parameter to the given java.sql.Time value.
      void setTime​(int n, java.sql.Time x, java.util.Calendar cal)  
      void setTime​(int n, java.sql.Time x, java.util.Calendar cal, boolean forceEncrypt)
      Sets the designated parameter to the given java.sql.Time value.
      void setTimestamp​(int n, java.sql.Timestamp x)  
      void setTimestamp​(int n, java.sql.Timestamp x, int scale)
      Sets the designated parameter to the given java.sql.Timestamp value.
      void setTimestamp​(int n, java.sql.Timestamp x, int scale, boolean forceEncrypt)
      Sets the designated parameter to the given java.sql.Timestamp value.
      void setTimestamp​(int n, java.sql.Timestamp x, java.util.Calendar cal)  
      void setTimestamp​(int n, java.sql.Timestamp x, java.util.Calendar cal, boolean forceEncrypt)
      Sets the designated parameter to the given java.sql.Timestamp value.
      void setUnicodeStream​(int n, java.io.InputStream x, int length)
      Deprecated.
      void setUniqueIdentifier​(int index, java.lang.String guid)
      Sets the designated parameter to the given String.
      void setUniqueIdentifier​(int index, java.lang.String guid, boolean forceEncrypt)
      Sets the designated parameter to the given String.
      void setURL​(int parameterIndex, java.net.URL x)  
      void setUseFmtOnly​(boolean useFmtOnly)
      Specifies the flag to use FMTONLY for parameter metadata queries.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
      • Methods inherited from interface java.sql.Statement

        cancel, clearWarnings, close, closeOnCompletion, enquoteIdentifier, enquoteLiteral, enquoteNCharLiteral, execute, execute, execute, executeLargeUpdate, executeLargeUpdate, executeLargeUpdate, executeLargeUpdate, 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
      • Methods inherited from interface java.sql.Wrapper

        isWrapperFor, unwrap
    • Method Detail

      • clearParameters

        public final void clearParameters()
                                   throws SQLServerException
        Specified by:
        clearParameters in interface java.sql.PreparedStatement
        Throws:
        SQLServerException
      • executeQuery

        public java.sql.ResultSet executeQuery()
                                        throws SQLServerException,
                                               java.sql.SQLTimeoutException
        Specified by:
        executeQuery in interface java.sql.PreparedStatement
        Throws:
        SQLServerException
        java.sql.SQLTimeoutException
      • executeUpdate

        public int executeUpdate()
                          throws SQLServerException,
                                 java.sql.SQLTimeoutException
        Specified by:
        executeUpdate in interface java.sql.PreparedStatement
        Throws:
        SQLServerException
        java.sql.SQLTimeoutException
      • executeLargeUpdate

        public long executeLargeUpdate()
                                throws SQLServerException,
                                       java.sql.SQLTimeoutException
        Specified by:
        executeLargeUpdate in interface java.sql.PreparedStatement
        Throws:
        SQLServerException
        java.sql.SQLTimeoutException
      • execute

        public boolean execute()
                        throws SQLServerException,
                               java.sql.SQLTimeoutException
        Specified by:
        execute in interface java.sql.PreparedStatement
        Throws:
        SQLServerException
        java.sql.SQLTimeoutException
      • getMetaData

        public final java.sql.ResultSetMetaData getMetaData()
                                                     throws SQLServerException
        Specified by:
        getMetaData in interface java.sql.PreparedStatement
        Throws:
        SQLServerException
      • setAsciiStream

        public final void setAsciiStream​(int parameterIndex,
                                         java.io.InputStream x)
                                  throws java.sql.SQLException
        Specified by:
        setAsciiStream in interface java.sql.PreparedStatement
        Throws:
        java.sql.SQLException
      • setAsciiStream

        public final void setAsciiStream​(int n,
                                         java.io.InputStream x,
                                         int length)
                                  throws SQLServerException
        Specified by:
        setAsciiStream in interface java.sql.PreparedStatement
        Throws:
        SQLServerException
      • setAsciiStream

        public final void setAsciiStream​(int parameterIndex,
                                         java.io.InputStream x,
                                         long length)
                                  throws java.sql.SQLException
        Specified by:
        setAsciiStream in interface java.sql.PreparedStatement
        Throws:
        java.sql.SQLException
      • setBigDecimal

        public final void setBigDecimal​(int parameterIndex,
                                        java.math.BigDecimal x)
                                 throws SQLServerException
        Specified by:
        setBigDecimal in interface java.sql.PreparedStatement
        Throws:
        SQLServerException
      • setBigDecimal

        public final void setBigDecimal​(int parameterIndex,
                                        java.math.BigDecimal x,
                                        int precision,
                                        int scale)
                                 throws SQLServerException
        Description copied from interface: ISQLServerPreparedStatement
        Sets the designated parameter to the given java.math.BigDecimal value. The driver converts this to an SQL NUMERIC value when it sends it to the database.
        Specified by:
        setBigDecimal in interface ISQLServerPreparedStatement
        Parameters:
        parameterIndex - the first parameter is 1, the second is 2, ...
        x - the parameter value
        precision - the precision of the column
        scale - the scale of the column
        Throws:
        SQLServerException - when an error occurs
      • setBigDecimal

        public final void setBigDecimal​(int parameterIndex,
                                        java.math.BigDecimal x,
                                        int precision,
                                        int scale,
                                        boolean forceEncrypt)
                                 throws SQLServerException
        Description copied from interface: ISQLServerPreparedStatement
        Sets the designated parameter to the given java.math.BigDecimal value. The driver converts this to an SQL NUMERIC value when it sends it to the database.
        Specified by:
        setBigDecimal in interface ISQLServerPreparedStatement
        Parameters:
        parameterIndex - the first parameter is 1, the second is 2, ...
        x - the parameter value
        precision - the precision of the column
        scale - the scale of the column
        forceEncrypt - 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.
        Throws:
        SQLServerException - when an error occurs
      • setMoney

        public final void setMoney​(int n,
                                   java.math.BigDecimal x)
                            throws SQLServerException
        Description copied from interface: ISQLServerPreparedStatement
        Sets the designated parameter to the given java.math.BigDecimal value. The driver converts this to an SQL NUMERIC value when it sends it to the database.
        Specified by:
        setMoney in interface ISQLServerPreparedStatement
        Parameters:
        n - the first parameter is 1, the second is 2, ...
        x - the parameter value
        Throws:
        SQLServerException - when an error occurs
      • setMoney

        public final void setMoney​(int n,
                                   java.math.BigDecimal x,
                                   boolean forceEncrypt)
                            throws SQLServerException
        Description copied from interface: ISQLServerPreparedStatement
        Sets the designated parameter to the given java.math.BigDecimal value. The driver converts this to an SQL NUMERIC value when it sends it to the database.
        Specified by:
        setMoney in interface ISQLServerPreparedStatement
        Parameters:
        n - the first parameter is 1, the second is 2, ...
        x - the parameter value
        forceEncrypt - 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.
        Throws:
        SQLServerException - when an error occurs
      • setSmallMoney

        public final void setSmallMoney​(int n,
                                        java.math.BigDecimal x)
                                 throws SQLServerException
        Description copied from interface: ISQLServerPreparedStatement
        Sets the designated parameter to the given java.math.BigDecimal value. The driver converts this to an SQL NUMERIC value when it sends it to the database.
        Specified by:
        setSmallMoney in interface ISQLServerPreparedStatement
        Parameters:
        n - the first parameter is 1, the second is 2, ...
        x - the parameter value
        Throws:
        SQLServerException - when an error occurs
      • setSmallMoney

        public final void setSmallMoney​(int n,
                                        java.math.BigDecimal x,
                                        boolean forceEncrypt)
                                 throws SQLServerException
        Description copied from interface: ISQLServerPreparedStatement
        Sets the designated parameter to the given java.math.BigDecimal value. The driver converts this to an SQL NUMERIC value when it sends it to the database.
        Specified by:
        setSmallMoney in interface ISQLServerPreparedStatement
        Parameters:
        n - the first parameter is 1, the second is 2, ...
        x - the parameter value
        forceEncrypt - 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.
        Throws:
        SQLServerException - when an error occurs
      • setBinaryStream

        public final void setBinaryStream​(int parameterIndex,
                                          java.io.InputStream x)
                                   throws java.sql.SQLException
        Specified by:
        setBinaryStream in interface java.sql.PreparedStatement
        Throws:
        java.sql.SQLException
      • setBinaryStream

        public final void setBinaryStream​(int n,
                                          java.io.InputStream x,
                                          int length)
                                   throws SQLServerException
        Specified by:
        setBinaryStream in interface java.sql.PreparedStatement
        Throws:
        SQLServerException
      • setBinaryStream

        public final void setBinaryStream​(int parameterIndex,
                                          java.io.InputStream x,
                                          long length)
                                   throws java.sql.SQLException
        Specified by:
        setBinaryStream in interface java.sql.PreparedStatement
        Throws:
        java.sql.SQLException
      • setBoolean

        public final void setBoolean​(int n,
                                     boolean x)
                              throws SQLServerException
        Specified by:
        setBoolean in interface java.sql.PreparedStatement
        Throws:
        SQLServerException
      • setBoolean

        public final void setBoolean​(int n,
                                     boolean x,
                                     boolean forceEncrypt)
                              throws SQLServerException
        Description copied from interface: ISQLServerPreparedStatement
        Sets the designated parameter to the given Java boolean value. The driver converts this to an SQL BIT or BOOLEAN value when it sends it to the database.
        Specified by:
        setBoolean in interface ISQLServerPreparedStatement
        Parameters:
        n - the first parameter is 1, the second is 2, ...
        x - the parameter value
        forceEncrypt - 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.
        Throws:
        SQLServerException - when an error occurs
      • setByte

        public final void setByte​(int n,
                                  byte x,
                                  boolean forceEncrypt)
                           throws SQLServerException
        Description copied from interface: ISQLServerPreparedStatement
        Sets the designated parameter to the given Java byte value. The driver converts this to an SQL TINYINT value when it sends it to the database.
        Specified by:
        setByte in interface ISQLServerPreparedStatement
        Parameters:
        n - the first parameter is 1, the second is 2, ...
        x - the parameter value
        forceEncrypt - 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.
        Throws:
        SQLServerException - when an error occurs
      • setBytes

        public final void setBytes​(int n,
                                   byte[] x,
                                   boolean forceEncrypt)
                            throws SQLServerException
        Description copied from interface: ISQLServerPreparedStatement
        Sets the designated parameter to the given Java array of bytes. The driver converts this to an SQL 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.
        Specified by:
        setBytes in interface ISQLServerPreparedStatement
        Parameters:
        n - the first parameter is 1, the second is 2, ...
        x - the parameter value
        forceEncrypt - 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.
        Throws:
        SQLServerException - when an error occurs
      • setUniqueIdentifier

        public final void setUniqueIdentifier​(int index,
                                              java.lang.String guid,
                                              boolean forceEncrypt)
                                       throws SQLServerException
        Description copied from interface: ISQLServerPreparedStatement
        Sets the designated parameter to the given String. The driver converts this to an SQL GUID
        Specified by:
        setUniqueIdentifier in interface ISQLServerPreparedStatement
        Parameters:
        index - the first parameter is 1, the second is 2, ...
        guid - string representation of the uniqueIdentifier value
        forceEncrypt - 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.
        Throws:
        SQLServerException - when an error occurs
      • setDouble

        public final void setDouble​(int n,
                                    double x)
                             throws SQLServerException
        Specified by:
        setDouble in interface java.sql.PreparedStatement
        Throws:
        SQLServerException
      • setDouble

        public final void setDouble​(int n,
                                    double x,
                                    boolean forceEncrypt)
                             throws SQLServerException
        Description copied from interface: ISQLServerPreparedStatement
        Sets the designated parameter to the given Java double value. The driver converts this to an SQL DOUBLE value when it sends it to the database.
        Specified by:
        setDouble in interface ISQLServerPreparedStatement
        Parameters:
        n - the first parameter is 1, the second is 2, ...
        x - the parameter value
        forceEncrypt - 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.
        Throws:
        SQLServerException - when an error occurs
      • setFloat

        public final void setFloat​(int n,
                                   float x,
                                   boolean forceEncrypt)
                            throws SQLServerException
        Description copied from interface: ISQLServerPreparedStatement
        Sets the designated parameter to the given Java float value. The driver converts this to an SQL REAL value when it sends it to the database.
        Specified by:
        setFloat in interface ISQLServerPreparedStatement
        Parameters:
        n - the first parameter is 1, the second is 2, ...
        x - the parameter value
        forceEncrypt - 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.
        Throws:
        SQLServerException - when an error occurs
      • setInt

        public final void setInt​(int n,
                                 int value,
                                 boolean forceEncrypt)
                          throws SQLServerException
        Description copied from interface: ISQLServerPreparedStatement
        Sets the designated parameter to the given Java int value. The driver converts this to an SQL INTEGER value when it sends it to the database.
        Specified by:
        setInt in interface ISQLServerPreparedStatement
        Parameters:
        n - the first parameter is 1, the second is 2, ...
        value - the parameter value
        forceEncrypt - 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.
        Throws:
        SQLServerException - when an error occurs
      • setLong

        public final void setLong​(int n,
                                  long x,
                                  boolean forceEncrypt)
                           throws SQLServerException
        Description copied from interface: ISQLServerPreparedStatement
        Sets the designated parameter to the given Java long value. The driver converts this to an SQL BIGINT value when it sends it to the database.
        Specified by:
        setLong in interface ISQLServerPreparedStatement
        Parameters:
        n - the first parameter is 1, the second is 2, ...
        x - the parameter value
        forceEncrypt - 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.
        Throws:
        SQLServerException - when an error occurs
      • setNull

        public final void setNull​(int index,
                                  int jdbcType)
                           throws SQLServerException
        Specified by:
        setNull in interface java.sql.PreparedStatement
        Throws:
        SQLServerException
      • setObject

        public final void setObject​(int index,
                                    java.lang.Object obj)
                             throws SQLServerException
        Specified by:
        setObject in interface java.sql.PreparedStatement
        Throws:
        SQLServerException
      • setObject

        public final void setObject​(int n,
                                    java.lang.Object obj,
                                    int jdbcType)
                             throws SQLServerException
        Specified by:
        setObject in interface java.sql.PreparedStatement
        Throws:
        SQLServerException
      • setObject

        public final void setObject​(int parameterIndex,
                                    java.lang.Object x,
                                    int targetSqlType,
                                    int scaleOrLength)
                             throws SQLServerException
        Specified by:
        setObject in interface java.sql.PreparedStatement
        Throws:
        SQLServerException
      • setObject

        public final void setObject​(int parameterIndex,
                                    java.lang.Object x,
                                    int targetSqlType,
                                    java.lang.Integer precision,
                                    int scale)
                             throws SQLServerException
        Description copied from interface: ISQLServerPreparedStatement
        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.

        Specified by:
        setObject in interface ISQLServerPreparedStatement
        Parameters:
        parameterIndex - the first parameter is 1, the second is 2, ...
        x - the object containing the input parameter value
        targetSqlType - 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 column
        scale - scale of the column
        Throws:
        SQLServerException - when an error occurs
      • setObject

        public final void setObject​(int parameterIndex,
                                    java.lang.Object x,
                                    int targetSqlType,
                                    java.lang.Integer precision,
                                    int scale,
                                    boolean forceEncrypt)
                             throws SQLServerException
        Description copied from interface: ISQLServerPreparedStatement
        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.

        Specified by:
        setObject in interface ISQLServerPreparedStatement
        Parameters:
        parameterIndex - the first parameter is 1, the second is 2, ...
        x - the object containing the input parameter value
        targetSqlType - 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 column
        scale - scale of the column
        forceEncrypt - 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.
        Throws:
        SQLServerException - when an error occurs
      • setObject

        public final void setObject​(int index,
                                    java.lang.Object obj,
                                    java.sql.SQLType jdbcType)
                             throws SQLServerException
        Specified by:
        setObject in interface java.sql.PreparedStatement
        Throws:
        SQLServerException
      • setObject

        public final void setObject​(int parameterIndex,
                                    java.lang.Object x,
                                    java.sql.SQLType targetSqlType,
                                    int scaleOrLength)
                             throws SQLServerException
        Specified by:
        setObject in interface java.sql.PreparedStatement
        Throws:
        SQLServerException
      • setObject

        public final void setObject​(int parameterIndex,
                                    java.lang.Object x,
                                    java.sql.SQLType targetSqlType,
                                    java.lang.Integer precision,
                                    java.lang.Integer scale)
                             throws SQLServerException
        Description copied from interface: ISQLServerPreparedStatement
        Sets the value of the designated parameter with the given object. This method is similar to PreparedStatement.setObject(int parameterIndex, Object x, SQLType targetSqlType, int scaleOrLength), except that it assumes a scale of zero.

        The default implementation will throw SQLFeatureNotSupportedException

        Specified by:
        setObject in interface ISQLServerPreparedStatement
        Parameters:
        parameterIndex - the first parameter is 1, the second is 2, ...
        x - the object containing the input parameter value
        targetSqlType - the SQL type to be sent to the database
        precision - the precision of the column
        scale - the scale of the column
        Throws:
        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
      • setObject

        public final void setObject​(int parameterIndex,
                                    java.lang.Object x,
                                    java.sql.SQLType targetSqlType,
                                    java.lang.Integer precision,
                                    java.lang.Integer scale,
                                    boolean forceEncrypt)
                             throws SQLServerException
        Description copied from interface: ISQLServerPreparedStatement
        Sets the value of the designated parameter with the given object. This method is similar to PreparedStatement.setObject(int parameterIndex, Object x, SQLType targetSqlType, int scaleOrLength), except that it assumes a scale of zero.

        The default implementation will throw SQLFeatureNotSupportedException

        Specified by:
        setObject in interface ISQLServerPreparedStatement
        Parameters:
        parameterIndex - the first parameter is 1, the second is 2, ...
        x - the object containing the input parameter value
        targetSqlType - the SQL type to be sent to the database
        precision - the precision of the column
        scale - the scale of the column
        forceEncrypt - 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.
        Throws:
        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
      • setShort

        public final void setShort​(int index,
                                   short x)
                            throws SQLServerException
        Specified by:
        setShort in interface java.sql.PreparedStatement
        Throws:
        SQLServerException
      • setShort

        public final void setShort​(int index,
                                   short x,
                                   boolean forceEncrypt)
                            throws SQLServerException
        Description copied from interface: ISQLServerPreparedStatement
        Sets the designated parameter to the given Java short value. The driver converts this to an SQL SMALLINT value when it sends it to the database.
        Specified by:
        setShort in interface ISQLServerPreparedStatement
        Parameters:
        index - the first parameter is 1, the second is 2, ...
        x - the parameter value
        forceEncrypt - 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.
        Throws:
        SQLServerException - when an error occurs
      • setString

        public final void setString​(int index,
                                    java.lang.String str)
                             throws SQLServerException
        Specified by:
        setString in interface java.sql.PreparedStatement
        Throws:
        SQLServerException
      • setString

        public final void setString​(int index,
                                    java.lang.String str,
                                    boolean forceEncrypt)
                             throws SQLServerException
        Description copied from interface: ISQLServerPreparedStatement
        Sets the designated parameter to the given Java 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.
        Specified by:
        setString in interface ISQLServerPreparedStatement
        Parameters:
        index - the first parameter is 1, the second is 2, ...
        str - the parameter value
        forceEncrypt - 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.
        Throws:
        SQLServerException - when an error occurs
      • setNString

        public final void setNString​(int parameterIndex,
                                     java.lang.String value)
                              throws java.sql.SQLException
        Specified by:
        setNString in interface java.sql.PreparedStatement
        Throws:
        java.sql.SQLException
      • setNString

        public final void setNString​(int parameterIndex,
                                     java.lang.String value,
                                     boolean forceEncrypt)
                              throws SQLServerException
        Description copied from interface: ISQLServerPreparedStatement
        Sets the designated parameter to the given 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.
        Specified by:
        setNString in interface ISQLServerPreparedStatement
        Parameters:
        parameterIndex - of the first parameter is 1, the second is 2, ...
        value - the parameter value
        forceEncrypt - 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.
        Throws:
        SQLServerException - when an error occurs
      • setTime

        public final void setTime​(int n,
                                  java.sql.Time x)
                           throws SQLServerException
        Specified by:
        setTime in interface java.sql.PreparedStatement
        Throws:
        SQLServerException
      • setTime

        public final void setTime​(int n,
                                  java.sql.Time x,
                                  int scale,
                                  boolean forceEncrypt)
                           throws SQLServerException
        Description copied from interface: ISQLServerPreparedStatement
        Sets the designated parameter to the given java.sql.Time value.
        Specified by:
        setTime in interface ISQLServerPreparedStatement
        Parameters:
        n - the first parameter is 1, the second is 2, ...
        x - the parameter value
        scale - the scale of the column
        forceEncrypt - 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.
        Throws:
        SQLServerException - when an error occurs
      • setTimestamp

        public final void setTimestamp​(int n,
                                       java.sql.Timestamp x)
                                throws SQLServerException
        Specified by:
        setTimestamp in interface java.sql.PreparedStatement
        Throws:
        SQLServerException
      • setTimestamp

        public final void setTimestamp​(int n,
                                       java.sql.Timestamp x,
                                       int scale,
                                       boolean forceEncrypt)
                                throws SQLServerException
        Description copied from interface: ISQLServerPreparedStatement
        Sets the designated parameter to the given java.sql.Timestamp value.
        Specified by:
        setTimestamp in interface ISQLServerPreparedStatement
        Parameters:
        n - the first parameter is 1, the second is 2, ...
        x - the parameter value
        scale - the scale of the column
        forceEncrypt - 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.
        Throws:
        SQLServerException - when an error occurs
      • setDateTimeOffset

        public final void setDateTimeOffset​(int n,
                                            DateTimeOffset x)
                                     throws SQLServerException
        Description copied from interface: ISQLServerPreparedStatement
        Sets the designated parameter to the given microsoft.sql.DateTimeOffset value.
        Specified by:
        setDateTimeOffset in interface ISQLServerPreparedStatement
        Parameters:
        n - the first parameter is 1, the second is 2, ...
        x - the parameter value
        Throws:
        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
      • setDateTimeOffset

        public final void setDateTimeOffset​(int n,
                                            DateTimeOffset x,
                                            int scale,
                                            boolean forceEncrypt)
                                     throws SQLServerException
        Description copied from interface: ISQLServerPreparedStatement
        Sets the designated parameter to the given microsoft.sql.DatetimeOffset value.
        Specified by:
        setDateTimeOffset in interface ISQLServerPreparedStatement
        Parameters:
        n - the first parameter is 1, the second is 2, ...
        x - the parameter value
        scale - the scale of the column
        forceEncrypt - 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.
        Throws:
        SQLServerException - when an error occurs
      • setDate

        public final void setDate​(int n,
                                  java.sql.Date x)
                           throws SQLServerException
        Specified by:
        setDate in interface java.sql.PreparedStatement
        Throws:
        SQLServerException
      • setDateTime

        public final void setDateTime​(int n,
                                      java.sql.Timestamp x,
                                      boolean forceEncrypt)
                               throws SQLServerException
        Description copied from interface: ISQLServerPreparedStatement
        Sets the designated parameter to the given java.sql.Timestamp value.
        Specified by:
        setDateTime in interface ISQLServerPreparedStatement
        Parameters:
        n - the first parameter is 1, the second is 2, ...
        x - the parameter value
        forceEncrypt - 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.
        Throws:
        SQLServerException - when an error occurs
      • setSmallDateTime

        public final void setSmallDateTime​(int n,
                                           java.sql.Timestamp x,
                                           boolean forceEncrypt)
                                    throws SQLServerException
        Description copied from interface: ISQLServerPreparedStatement
        Sets the designated parameter to the given java.sql.Timestamp value.
        Specified by:
        setSmallDateTime in interface ISQLServerPreparedStatement
        Parameters:
        n - the first parameter is 1, the second is 2, ...
        x - the parameter value
        forceEncrypt - 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.
        Throws:
        SQLServerException - when an error occurs
      • setStructured

        public final void setStructured​(int n,
                                        java.lang.String tvpName,
                                        java.sql.ResultSet tvpResultSet)
                                 throws SQLServerException
        Description copied from interface: ISQLServerPreparedStatement
        Sets the result set to populate a table-valued parameter.
        Specified by:
        setStructured in interface ISQLServerPreparedStatement
        Parameters:
        n - the first parameter is 1, the second is 2, ...
        tvpName - the name of the table valued parameter
        tvpResultSet - the source resultset object
        Throws:
        SQLServerException - when an error occurs
      • setUnicodeStream

        @Deprecated
        public final void setUnicodeStream​(int n,
                                           java.io.InputStream x,
                                           int length)
                                    throws java.sql.SQLException
        Deprecated.
        Specified by:
        setUnicodeStream in interface java.sql.PreparedStatement
        Throws:
        java.sql.SQLException
      • executeBatch

        public int[] executeBatch()
                           throws SQLServerException,
                                  java.sql.BatchUpdateException,
                                  java.sql.SQLTimeoutException
        Description copied from class: SQLServerStatement
        Sends a batch of statements to the database.
        Specified by:
        executeBatch in interface java.sql.Statement
        Overrides:
        executeBatch in class SQLServerStatement
        Throws:
        SQLServerException
        java.sql.BatchUpdateException
        java.sql.SQLTimeoutException
      • setCharacterStream

        public final void setCharacterStream​(int parameterIndex,
                                             java.io.Reader reader)
                                      throws java.sql.SQLException
        Specified by:
        setCharacterStream in interface java.sql.PreparedStatement
        Throws:
        java.sql.SQLException
      • setCharacterStream

        public final void setCharacterStream​(int n,
                                             java.io.Reader reader,
                                             int length)
                                      throws SQLServerException
        Specified by:
        setCharacterStream in interface java.sql.PreparedStatement
        Throws:
        SQLServerException
      • setCharacterStream

        public final void setCharacterStream​(int parameterIndex,
                                             java.io.Reader reader,
                                             long length)
                                      throws java.sql.SQLException
        Specified by:
        setCharacterStream in interface java.sql.PreparedStatement
        Throws:
        java.sql.SQLException
      • setNCharacterStream

        public final void setNCharacterStream​(int parameterIndex,
                                              java.io.Reader value)
                                       throws java.sql.SQLException
        Specified by:
        setNCharacterStream in interface java.sql.PreparedStatement
        Throws:
        java.sql.SQLException
      • setNCharacterStream

        public final void setNCharacterStream​(int parameterIndex,
                                              java.io.Reader value,
                                              long length)
                                       throws java.sql.SQLException
        Specified by:
        setNCharacterStream in interface java.sql.PreparedStatement
        Throws:
        java.sql.SQLException
      • setRef

        public final void setRef​(int i,
                                 java.sql.Ref x)
                          throws java.sql.SQLException
        Specified by:
        setRef in interface java.sql.PreparedStatement
        Throws:
        java.sql.SQLException
      • setBlob

        public final void setBlob​(int i,
                                  java.sql.Blob x)
                           throws java.sql.SQLException
        Specified by:
        setBlob in interface java.sql.PreparedStatement
        Throws:
        java.sql.SQLException
      • setBlob

        public final void setBlob​(int parameterIndex,
                                  java.io.InputStream inputStream)
                           throws java.sql.SQLException
        Specified by:
        setBlob in interface java.sql.PreparedStatement
        Throws:
        java.sql.SQLException
      • setBlob

        public final void setBlob​(int parameterIndex,
                                  java.io.InputStream inputStream,
                                  long length)
                           throws java.sql.SQLException
        Specified by:
        setBlob in interface java.sql.PreparedStatement
        Throws:
        java.sql.SQLException
      • setClob

        public final void setClob​(int parameterIndex,
                                  java.sql.Clob clobValue)
                           throws java.sql.SQLException
        Specified by:
        setClob in interface java.sql.PreparedStatement
        Throws:
        java.sql.SQLException
      • setClob

        public final void setClob​(int parameterIndex,
                                  java.io.Reader reader)
                           throws java.sql.SQLException
        Specified by:
        setClob in interface java.sql.PreparedStatement
        Throws:
        java.sql.SQLException
      • setClob

        public final void setClob​(int parameterIndex,
                                  java.io.Reader reader,
                                  long length)
                           throws java.sql.SQLException
        Specified by:
        setClob in interface java.sql.PreparedStatement
        Throws:
        java.sql.SQLException
      • setNClob

        public final void setNClob​(int parameterIndex,
                                   java.sql.NClob value)
                            throws java.sql.SQLException
        Specified by:
        setNClob in interface java.sql.PreparedStatement
        Throws:
        java.sql.SQLException
      • setNClob

        public final void setNClob​(int parameterIndex,
                                   java.io.Reader reader)
                            throws java.sql.SQLException
        Specified by:
        setNClob in interface java.sql.PreparedStatement
        Throws:
        java.sql.SQLException
      • setNClob

        public final void setNClob​(int parameterIndex,
                                   java.io.Reader reader,
                                   long length)
                            throws java.sql.SQLException
        Specified by:
        setNClob in interface java.sql.PreparedStatement
        Throws:
        java.sql.SQLException
      • setArray

        public final void setArray​(int i,
                                   java.sql.Array x)
                            throws java.sql.SQLException
        Specified by:
        setArray in interface java.sql.PreparedStatement
        Throws:
        java.sql.SQLException
      • setDate

        public final void setDate​(int n,
                                  java.sql.Date x,
                                  java.util.Calendar cal)
                           throws SQLServerException
        Specified by:
        setDate in interface java.sql.PreparedStatement
        Throws:
        SQLServerException
      • setDate

        public final void setDate​(int n,
                                  java.sql.Date x,
                                  java.util.Calendar cal,
                                  boolean forceEncrypt)
                           throws SQLServerException
        Description copied from interface: ISQLServerPreparedStatement
        Sets the designated parameter to the given 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.
        Specified by:
        setDate in interface ISQLServerPreparedStatement
        Parameters:
        n - the first parameter is 1, the second is 2, ...
        x - the parameter value
        cal - the Calendar object the driver will use to construct the date
        forceEncrypt - 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.
        Throws:
        SQLServerException - when an error occurs
      • setTime

        public final void setTime​(int n,
                                  java.sql.Time x,
                                  java.util.Calendar cal)
                           throws SQLServerException
        Specified by:
        setTime in interface java.sql.PreparedStatement
        Throws:
        SQLServerException
      • setTime

        public final void setTime​(int n,
                                  java.sql.Time x,
                                  java.util.Calendar cal,
                                  boolean forceEncrypt)
                           throws SQLServerException
        Description copied from interface: ISQLServerPreparedStatement
        Sets the designated parameter to the given java.sql.Time value. The driver converts this to an SQL TIME value when it sends it to the database.
        Specified by:
        setTime in interface ISQLServerPreparedStatement
        Parameters:
        n - the first parameter is 1, the second is 2, ...
        x - the parameter value
        cal - the Calendar object the driver will use to construct the date
        forceEncrypt - 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.
        Throws:
        SQLServerException - when an error occurs
      • setTimestamp

        public final void setTimestamp​(int n,
                                       java.sql.Timestamp x,
                                       java.util.Calendar cal)
                                throws SQLServerException
        Specified by:
        setTimestamp in interface java.sql.PreparedStatement
        Throws:
        SQLServerException
      • setTimestamp

        public final void setTimestamp​(int n,
                                       java.sql.Timestamp x,
                                       java.util.Calendar cal,
                                       boolean forceEncrypt)
                                throws SQLServerException
        Description copied from interface: ISQLServerPreparedStatement
        Sets the designated parameter to the given java.sql.Timestamp value. The driver converts this to an SQL TIMESTAMP value when it sends it to the database.
        Specified by:
        setTimestamp in interface ISQLServerPreparedStatement
        Parameters:
        n - the first parameter is 1, the second is 2, ...
        x - the parameter value
        cal - the Calendar object the driver will use to construct the date
        forceEncrypt - 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.
        Throws:
        SQLServerException - when an error occurs
      • setNull

        public final void setNull​(int paramIndex,
                                  int sqlType,
                                  java.lang.String typeName)
                           throws SQLServerException
        Specified by:
        setNull in interface java.sql.PreparedStatement
        Throws:
        SQLServerException
      • getParameterMetaData

        public final java.sql.ParameterMetaData getParameterMetaData()
                                                              throws SQLServerException
        Specified by:
        getParameterMetaData in interface java.sql.PreparedStatement
        Throws:
        SQLServerException
      • setURL

        public final void setURL​(int parameterIndex,
                                 java.net.URL x)
                          throws java.sql.SQLException
        Specified by:
        setURL in interface java.sql.PreparedStatement
        Throws:
        java.sql.SQLException
      • setRowId

        public final void setRowId​(int parameterIndex,
                                   java.sql.RowId x)
                            throws java.sql.SQLException
        Specified by:
        setRowId in interface java.sql.PreparedStatement
        Throws:
        java.sql.SQLException
      • setSQLXML

        public final void setSQLXML​(int parameterIndex,
                                    java.sql.SQLXML xmlObject)
                             throws java.sql.SQLException
        Specified by:
        setSQLXML in interface java.sql.PreparedStatement
        Throws:
        java.sql.SQLException