src/Driver/SQLServer/SQLServerDriver.php
protected function bindParameters(Statement $statement, array $parameters): Statement
    {
        foreach ($parameters as $index => $parameter) {
            if (is_numeric($index)) {
                if ($parameter->getType() == PDO::PARAM_LOB) {
                    $value = $parameter->getValue();
                    $statement->bindParam(
                        $index + 1,
                        $value,
                        $parameter->getType(),
                        0,
                        PDO::SQLSRV_ENCODING_BINARY
                    );
                    continue;
                }

                //Numeric, @see http://php.net/manual/en/pdostatement.bindparam.php
                $statement->bindValue($index + 1, $parameter->getValue(), $parameter->getType());
            } else {
                //Named
                $statement->bindValue($index, $parameter->getValue(), $parameter->getType());
            }
        }

        return $statement;
    }
protected function bindParameters(Statement $statement, array $parameters): Statement
    {
        foreach ($parameters as $index => $parameter) {
            if (is_numeric($index)) {
                if ($parameter->getType() == PDO::PARAM_LOB) {
                    $value = $parameter->getValue();
                    $statement->bindParam(
                        $index + 1,
                        $value,
                        $parameter->getType(),
                        0,
                        PDO::SQLSRV_ENCODING_BINARY
                    );
                    continue;
                }

                //Numeric, @see http://php.net/manual/en/pdostatement.bindparam.php
                $statement->bindValue($index + 1, $parameter->getValue(), $parameter->getType());
            } else {
                //Named
                $statement->bindValue($index, $parameter->getValue(), $parameter->getType());
            }
        }

        return $statement;
    }
protected function bindParameters ( Statement $ statement , array $ parameters ) : Statement { foreach ( $ parameters as $ index => $ parameter ) { if ( is_numeric ( $ index ) ) { if ( $ parameter -> getType ( ) == PDO :: PARAM_LOB ) { $ value = $ parameter -> getValue ( ) ; $ statement -> bindParam ( $ index + 1 , $ value , $ parameter -> getType ( ) , 0 , PDO :: SQLSRV_ENCODING_BINARY ) ; continue ; } //Numeric, @see http://php.net/manual/en/pdostatement.bindparam.php $ statement -> bindValue ( $ index + 1 , $ parameter -> getValue ( ) , $ parameter -> getType ( ) ) ; } else { //Named $ statement -> bindValue ( $ index , $ parameter -> getValue ( ) , $ parameter -> getType ( ) ) ; } } return $ statement ; }
Bind parameters into statement. SQLServer need encoding to be specified for binary parameters.

@param Statement            $statement
@param ParameterInterface[] $parameters Named hash of ParameterInterface.
@return Statement
Bind parameters into statement . SQLServer need encoding to be specified for binary parameters .