Skip to content

Loading…

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

Closed
doctrinebot opened this Issue · 2 comments

2 participants

@doctrinebot

Jira issue originally created by user @doctrinebot:

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

Url: #631

Message:

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(
        PDO::ATTR*CURSOR => PDO::CURSOR*SCROLL,
        PDO::SQLSRV*ATTR_CURSOR_SCROLL_TYPE => PDO::SQLSRV_CURSOR*STATIC
    )
);

the driverOptions-array is essential.
see http://msdn.microsoft.com/en-us/library/ff628176.aspx and http://at2.php.net/manual/de/pdo.prepare.php

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.

@doctrinebot

Comment created by @doctrinebot:

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

@doctrinebot

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.