Interface ISQLServerPreparedStatement

    • 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 Abstract Methods 
      Modifier and Type Method Description
      java.sql.ParameterMetaData getParameterMetaData​(boolean forceRefresh)
      Returns parameter metadata for the prepared statement.
      int getPreparedStatementHandle()
      The server handle for this prepared statement.
      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 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, 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 parameterIndex, java.sql.Timestamp x)
      Sets the designated parameter to the given java.sql.Timestamp value.
      void setDateTime​(int parameterIndex, java.sql.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, java.math.BigDecimal x)
      Sets the designated parameter to the given java.math.BigDecimal value.
      void setMoney​(int parameterIndex, java.math.BigDecimal x, boolean forceEncrypt)
      Sets the designated parameter to the given java.math.BigDecimal value.
      void setNString​(int parameterIndex, java.lang.String value, boolean forceEncrypt)
      Sets the designated parameter to the given String object.
      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 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 setShort​(int parameterIndex, short x, boolean forceEncrypt)
      Sets the designated parameter to the given Java short value.
      void setSmallDateTime​(int parameterIndex, java.sql.Timestamp x)
      Sets the designated parameter to the given java.sql.Timestamp value.
      void setSmallDateTime​(int parameterIndex, java.sql.Timestamp x, boolean forceEncrypt)
      Sets the designated parameter to the given java.sql.Timestamp value.
      void setSmallMoney​(int parameterIndex, java.math.BigDecimal x)
      Sets the designated parameter to the given java.math.BigDecimal value.
      void setSmallMoney​(int parameterIndex, java.math.BigDecimal x, boolean forceEncrypt)
      Sets the designated parameter to the given java.math.BigDecimal value.
      void setString​(int parameterIndex, java.lang.String str, boolean forceEncrypt)
      Sets the designated parameter to the given Java String value.
      void setStructured​(int parameterIndex, java.lang.String tvpName, ISQLServerDataRecord tvpBulkRecord)
      Sets the server bulk record to populate a table valued parameter.
      void setStructured​(int parameterIndex, java.lang.String tvpName, SQLServerDataTable tvpDataTable)
      Sets the data table to populates a table valued parameter.
      void setStructured​(int parameterIndex, java.lang.String tvpName, java.sql.ResultSet tvpResultSet)
      Sets the result set to populate a table-valued parameter.
      void setTime​(int parameterIndex, java.sql.Time x, int scale)
      Sets the designated parameter to the given java.sql.Time value.
      void setTime​(int parameterIndex, java.sql.Time x, int scale, boolean forceEncrypt)
      Sets the designated parameter to the given java.sql.Time value.
      void setTime​(int parameterIndex, java.sql.Time x, java.util.Calendar cal, boolean forceEncrypt)
      Sets the designated parameter to the given java.sql.Time value.
      void setTimestamp​(int parameterIndex, java.sql.Timestamp x, int scale)
      Sets the designated parameter to the given java.sql.Timestamp value.
      void setTimestamp​(int parameterIndex, java.sql.Timestamp x, int scale, boolean forceEncrypt)
      Sets the designated parameter to the given java.sql.Timestamp value.
      void setTimestamp​(int parameterIndex, java.sql.Timestamp x, java.util.Calendar cal, boolean forceEncrypt)
      Sets the designated parameter to the given java.sql.Timestamp value.
      void setUniqueIdentifier​(int parameterIndex, java.lang.String guid)
      Sets the designated parameter to the given String.
      void setUniqueIdentifier​(int parameterIndex, java.lang.String guid, boolean forceEncrypt)
      Sets the designated parameter to the given String.
      • Methods inherited from interface java.sql.PreparedStatement

        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
      • Methods inherited from interface java.sql.Statement

        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
      • Methods inherited from interface java.sql.Wrapper

        isWrapperFor, unwrap
    • Method Detail

      • setDateTimeOffset

        void setDateTimeOffset​(int parameterIndex,
                               DateTimeOffset x)
                        throws SQLServerException
        Sets the designated parameter to the given microsoft.sql.DateTimeOffset value.
        Parameters:
        parameterIndex - 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
      • setObject

        void setObject​(int parameterIndex,
                       java.lang.Object x,
                       java.sql.SQLType targetSqlType,
                       java.lang.Integer precision,
                       java.lang.Integer scale)
                throws SQLServerException
        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

        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

        void setObject​(int parameterIndex,
                       java.lang.Object x,
                       java.sql.SQLType targetSqlType,
                       java.lang.Integer precision,
                       java.lang.Integer scale,
                       boolean forceEncrypt)
                throws SQLServerException
        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

        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
      • getPreparedStatementHandle

        int getPreparedStatementHandle()
                                throws SQLServerException
        The server handle for this prepared statement. If a value < 1 is returned no handle has been created.
        Returns:
        Per the description.
        Throws:
        SQLServerException - when an error occurs
      • setBigDecimal

        void setBigDecimal​(int parameterIndex,
                           java.math.BigDecimal x,
                           int precision,
                           int scale)
                    throws SQLServerException
        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.
        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

        void setBigDecimal​(int parameterIndex,
                           java.math.BigDecimal x,
                           int precision,
                           int scale,
                           boolean forceEncrypt)
                    throws SQLServerException
        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.
        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

        void setMoney​(int parameterIndex,
                      java.math.BigDecimal x)
               throws SQLServerException
        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.
        Parameters:
        parameterIndex - the first parameter is 1, the second is 2, ...
        x - the parameter value
        Throws:
        SQLServerException - when an error occurs
      • setMoney

        void setMoney​(int parameterIndex,
                      java.math.BigDecimal x,
                      boolean forceEncrypt)
               throws SQLServerException
        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.
        Parameters:
        parameterIndex - 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

        void setSmallMoney​(int parameterIndex,
                           java.math.BigDecimal x)
                    throws SQLServerException
        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.
        Parameters:
        parameterIndex - the first parameter is 1, the second is 2, ...
        x - the parameter value
        Throws:
        SQLServerException - when an error occurs
      • setSmallMoney

        void setSmallMoney​(int parameterIndex,
                           java.math.BigDecimal x,
                           boolean forceEncrypt)
                    throws SQLServerException
        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.
        Parameters:
        parameterIndex - 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
      • setBoolean

        void setBoolean​(int parameterIndex,
                        boolean x,
                        boolean forceEncrypt)
                 throws SQLServerException
        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.
        Parameters:
        parameterIndex - 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

        void setByte​(int parameterIndex,
                     byte x,
                     boolean forceEncrypt)
              throws SQLServerException
        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.
        Parameters:
        parameterIndex - 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

        void setBytes​(int parameterIndex,
                      byte[] x,
                      boolean forceEncrypt)
               throws SQLServerException
        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.
        Parameters:
        parameterIndex - 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

        void setUniqueIdentifier​(int parameterIndex,
                                 java.lang.String guid)
                          throws SQLServerException
        Sets the designated parameter to the given String. The driver converts this to an SQL GUID
        Parameters:
        parameterIndex - the first parameter is 1, the second is 2, ...
        guid - string representation of the uniqueIdentifier value
        Throws:
        SQLServerException - when an error occurs
      • setUniqueIdentifier

        void setUniqueIdentifier​(int parameterIndex,
                                 java.lang.String guid,
                                 boolean forceEncrypt)
                          throws SQLServerException
        Sets the designated parameter to the given String. The driver converts this to an SQL GUID
        Parameters:
        parameterIndex - 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

        void setDouble​(int parameterIndex,
                       double x,
                       boolean forceEncrypt)
                throws SQLServerException
        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.
        Parameters:
        parameterIndex - 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

        void setFloat​(int parameterIndex,
                      float x,
                      boolean forceEncrypt)
               throws SQLServerException
        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.
        Parameters:
        parameterIndex - 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
      • setGeometry

        void setGeometry​(int parameterIndex,
                         Geometry x)
                  throws SQLServerException
        Sets the designated parameter to the given microsoft.sql.Geometry Class object. The driver converts this to an SQL REAL value when it sends it to the database.
        Parameters:
        parameterIndex - the first parameter is 1, the second is 2, ...
        x - the parameter value
        Throws:
        SQLServerException - when an error occurs
      • setGeography

        void setGeography​(int parameterIndex,
                          Geography x)
                   throws SQLServerException
        Sets the designated parameter to the given microsoft.sql.Geography Class object. The driver converts this to an SQL REAL value when it sends it to the database.
        Parameters:
        parameterIndex - the first parameter is 1, the second is 2, ...
        x - the parameter value
        Throws:
        SQLServerException - when an error occurs
      • setInt

        void setInt​(int parameterIndex,
                    int value,
                    boolean forceEncrypt)
             throws SQLServerException
        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.
        Parameters:
        parameterIndex - 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

        void setLong​(int parameterIndex,
                     long x,
                     boolean forceEncrypt)
              throws SQLServerException
        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.
        Parameters:
        parameterIndex - 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
      • setObject

        void setObject​(int parameterIndex,
                       java.lang.Object x,
                       int targetSqlType,
                       java.lang.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.

        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

        void setObject​(int parameterIndex,
                       java.lang.Object x,
                       int targetSqlType,
                       java.lang.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.

        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
      • setShort

        void setShort​(int parameterIndex,
                      short x,
                      boolean forceEncrypt)
               throws SQLServerException
        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.
        Parameters:
        parameterIndex - 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

        void setString​(int parameterIndex,
                       java.lang.String str,
                       boolean forceEncrypt)
                throws SQLServerException
        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.
        Parameters:
        parameterIndex - 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

        void setNString​(int parameterIndex,
                        java.lang.String value,
                        boolean forceEncrypt)
                 throws SQLServerException
        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.
        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

        void setTime​(int parameterIndex,
                     java.sql.Time x,
                     int scale)
              throws SQLServerException
        Sets the designated parameter to the given java.sql.Time value.
        Parameters:
        parameterIndex - the first parameter is 1, the second is 2, ...
        x - the parameter value
        scale - the scale of the column
        Throws:
        SQLServerException - when an error occurs
      • setTime

        void setTime​(int parameterIndex,
                     java.sql.Time x,
                     int scale,
                     boolean forceEncrypt)
              throws SQLServerException
        Sets the designated parameter to the given java.sql.Time value.
        Parameters:
        parameterIndex - 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

        void setTimestamp​(int parameterIndex,
                          java.sql.Timestamp x,
                          int scale)
                   throws SQLServerException
        Sets the designated parameter to the given java.sql.Timestamp value.
        Parameters:
        parameterIndex - the first parameter is 1, the second is 2, ...
        x - the parameter value
        scale - the scale of the column
        Throws:
        SQLServerException - when an error occurs
      • setTimestamp

        void setTimestamp​(int parameterIndex,
                          java.sql.Timestamp x,
                          int scale,
                          boolean forceEncrypt)
                   throws SQLServerException
        Sets the designated parameter to the given java.sql.Timestamp value.
        Parameters:
        parameterIndex - 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

        void setDateTimeOffset​(int parameterIndex,
                               DateTimeOffset x,
                               int scale)
                        throws SQLServerException
        Sets the designated parameter to the given microsoft.sql.DatetimeOffset value.
        Parameters:
        parameterIndex - the first parameter is 1, the second is 2, ...
        x - the parameter value
        scale - the scale of the column
        Throws:
        SQLServerException - when an error occurs
      • setDateTimeOffset

        void setDateTimeOffset​(int parameterIndex,
                               DateTimeOffset x,
                               int scale,
                               boolean forceEncrypt)
                        throws SQLServerException
        Sets the designated parameter to the given microsoft.sql.DatetimeOffset value.
        Parameters:
        parameterIndex - 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
      • setDateTime

        void setDateTime​(int parameterIndex,
                         java.sql.Timestamp x)
                  throws SQLServerException
        Sets the designated parameter to the given java.sql.Timestamp value.
        Parameters:
        parameterIndex - the first parameter is 1, the second is 2, ...
        x - the parameter value
        Throws:
        SQLServerException - when an error occurs
      • setDateTime

        void setDateTime​(int parameterIndex,
                         java.sql.Timestamp x,
                         boolean forceEncrypt)
                  throws SQLServerException
        Sets the designated parameter to the given java.sql.Timestamp value.
        Parameters:
        parameterIndex - 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

        void setSmallDateTime​(int parameterIndex,
                              java.sql.Timestamp x)
                       throws SQLServerException
        Sets the designated parameter to the given java.sql.Timestamp value.
        Parameters:
        parameterIndex - the first parameter is 1, the second is 2, ...
        x - the parameter value
        Throws:
        SQLServerException - when an error occurs
      • setSmallDateTime

        void setSmallDateTime​(int parameterIndex,
                              java.sql.Timestamp x,
                              boolean forceEncrypt)
                       throws SQLServerException
        Sets the designated parameter to the given java.sql.Timestamp value.
        Parameters:
        parameterIndex - 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

        void setStructured​(int parameterIndex,
                           java.lang.String tvpName,
                           SQLServerDataTable tvpDataTable)
                    throws SQLServerException
        Sets the data table to populates a table valued parameter.
        Parameters:
        parameterIndex - the first parameter is 1, the second is 2, ...
        tvpName - the name of the table valued parameter
        tvpDataTable - the source datatable object
        Throws:
        SQLServerException - when an error occurs
      • setStructured

        void setStructured​(int parameterIndex,
                           java.lang.String tvpName,
                           java.sql.ResultSet tvpResultSet)
                    throws SQLServerException
        Sets the result set to populate a table-valued parameter.
        Parameters:
        parameterIndex - 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
      • setStructured

        void setStructured​(int parameterIndex,
                           java.lang.String tvpName,
                           ISQLServerDataRecord tvpBulkRecord)
                    throws SQLServerException
        Sets the server bulk record to populate a table valued parameter.
        Parameters:
        parameterIndex - the first parameter is 1, the second is 2, ...
        tvpName - the name of the table valued parameter
        tvpBulkRecord - an ISQLServerDataRecord object
        Throws:
        SQLServerException - when an error occurs
      • setDate

        void setDate​(int parameterIndex,
                     java.sql.Date x,
                     java.util.Calendar cal,
                     boolean forceEncrypt)
              throws SQLServerException
        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.
        Parameters:
        parameterIndex - 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

        void setTime​(int parameterIndex,
                     java.sql.Time x,
                     java.util.Calendar cal,
                     boolean forceEncrypt)
              throws SQLServerException
        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.
        Parameters:
        parameterIndex - 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

        void setTimestamp​(int parameterIndex,
                          java.sql.Timestamp x,
                          java.util.Calendar cal,
                          boolean forceEncrypt)
                   throws SQLServerException
        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.
        Parameters:
        parameterIndex - 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
      • getParameterMetaData

        java.sql.ParameterMetaData getParameterMetaData​(boolean forceRefresh)
                                                 throws SQLServerException
        Returns parameter metadata for the prepared statement.
        Parameters:
        forceRefresh - : If true the cache will not be used to retrieve the metadata.
        Returns:
        Per the description.
        Throws:
        SQLServerException - when an error occurs