Unbuffered queries in MSSQL using php pdo

1.1k Views Asked by At

I'm looking for an MSSQL alternateive for this below constant

MYSQL_ATTR_USE_BUFFERED_QUERY

$pdo->setAttribute(PDO::MYSQL_ATTR_USE_BUFFERED_QUERY, false);

Above setiing is for MYSQL database. Is there any constant for MSSQL. If not how could i achieve Unbuffered concept for MSSQL using

PHP PDO

1

There are 1 best solutions below

0
DoPPeS On

As far as I'm aware and can find, such an attribute is only available to Mysql.

I did find an attribute for SQL SERVER with which you can set the memory size.

https://msdn.microsoft.com/en-us/library/ff628164%28v=sql.105%29.aspx

PDO::SQLSVR_CLIENT_BUFFER_MAX_SIZE
PDO::SQLSRV_ATTR_CLIENT_BUFFER_MAX_KB_SIZE

They do require you to install the MS PDO drivers. These also seem to be set on unlimited by default so I would guess the same applies for the default drivers.