Skip to content


DBAL-941: [GH-631] updated PDO_SQLSRV connection to use driverOptions in prepare-function #2185

doctrinebot opened this Issue · 2 comments

2 participants


Jira issue originally created by user @doctrinebot:

This issue is created automatically through a Github pull request on behalf of jaylinski:

Url: #631


it seems that the PDO::prepare $driver_options param was never used.
in order to use the PDOStatement::rowCount function, the connection to an sql-server has to be established with the following params:

$connectionParams = array(
    'host' => $cfgHostName,
    'port' => $cfgPort,
    'dbname' => $cfgDatabase,
    'user' => $cfgUser,
    'password' => $cfgPassword,
    'driver' => 'pdo_sqlsrv',
    'driverOptions' => array(

the driverOptions-array is essential.
see and

with the follwing commit, the driver options are used by the PDO_SQLSRV prepared statements.
maybe there's a better way to implement this. please share your opinion on this fix.


Comment created by @doctrinebot:

A related Github Pull-Request [GH-631] was closed:


Issue was closed with resolution "Invalid"

@deeky666 deeky666 was assigned by doctrinebot
@doctrinebot doctrinebot closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.