You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
returns everytime -1 because we cannot use PDO::ATTR_CURSOR attribute when we used native prepare
After debugging inside DBAL with PDO_SqlSrv wrapper we discover that prepare cannot be override like in the first issue with driverOptions
It's essential to use native Pdo::prepare($stmt, $options) to precise scrollable cursor to make it works..
Perhaps we have not seen any option or configuration, but runtime code does not seems to modify native prepare method in
doctrine/dbal/src/Driver/PDO/Connection.php line 55 on version 3.6.6
If you have any advice or fix to get back $driverOptions config as in #2185, it would be perfect
Best
The text was updated successfully, but these errors were encountered:
I just try to count my result here from statement method rowCount()
But as in this previous issue #2185 i can't use main driver option that seems removed before but is essential for us here to use driver options to make rowCount work well.
On my screenshot on my first post, you see your code in prepare method which cannot use prepare options anymore at runtime (previsously setted in main doctrine options with $driverOptions variable)
Actually the count result is always -1
If i use array(PDO::ATTR_CURSOR => PDO::CURSOR_SCROLL) in prepare option with buffered cursor the count result is right one
Hi team,
Bug Report
Previously closed issue #2185 on the same subject does not exist anymore in version 3.x
Actually the simple script above
returns everytime -1 because we cannot use PDO::ATTR_CURSOR attribute when we used native prepare
After debugging inside DBAL with PDO_SqlSrv wrapper we discover that prepare cannot be override like in the first issue with driverOptions
It's essential to use native Pdo::prepare($stmt, $options) to precise scrollable cursor to make it works..
$stmt = $conn->prepare($query, array(PDO::ATTR_CURSOR => PDO::CURSOR_SCROLL));
Perhaps we have not seen any option or configuration, but runtime code does not seems to modify native prepare method in
doctrine/dbal/src/Driver/PDO/Connection.php line 55 on version 3.6.6
If you have any advice or fix to get back $driverOptions config as in #2185, it would be perfect
Best
The text was updated successfully, but these errors were encountered: