phalcon / cphalcon

High performance, full-stack PHP framework delivered as a C extension.
https://phalcon.io
BSD 3-Clause "New" or "Revised" License
10.79k stars 1.96k forks source link

Turn off Multiple Active Result Sets (MARS) #11077

Closed ruudboon closed 7 years ago

ruudboon commented 9 years ago

I'm trying to get a MSSql connector working with Phalcon. I used the library created by @davideairaghi https://github.com/davideairaghi/php/tree/master/library/Airaghi/PhalconPHP/MSSQL

First I modified it to get it working with FreeDTS only. During this process I found out that Phalcon relies on Multiple Active Result Sets (MARS) (Phalcon\Db\Result\Pdo->numRows() fires new query using same connection) . Currently I'm trying to get FreeDTS with unixODBC working (that should support MARS) but at this point I'm getting Invalid cursor state errors.

Is it possible to turn off Multiple Active Result Sets and let Phalcon create new connections every time?

ruudboon commented 9 years ago

I fixed the issues regarding the FreeTDS and unixODBC. Would still be nice if there comes a possibility not to use MARS

sergeyklay commented 7 years ago

This requires backward incompatible changes in the code base, which will lead to serious problems for most users. Feel free to open a new feature request in the Incubator repo for that.