ID: 38805
Updated by: [email protected]
Reported By: gkrajci at arescorporation dot com
-Status: To be documented
+Status: Assigned
-Bug Type: Documentation problem
+Bug Type: PDO related
Operating System: Windows NT PBMA-WB2 5.2 build 37
PHP Version: 5.1.6
Assigned To: sfox
New Comment:
Steph, does this need any additional changes to pdo_mssql/pdo_dblib?
And what exactly should be documented?
Previous Comments:
------------------------------------------------------------------------
[2009-09-02 15:28:50] aballard at gmail dot com
According to the SQL Server documenation, SET TEXTSIZE { number } by
itself is not sufficient. That's why the original mssql library has two
configuration directives: mssql.textlimit and mssql.textsize
Since PDO is configured not to use configuration directives, it would
be nice if the pdo_mssql driver added two driver_options to configure
these values.
A quote from SQL Server Books Online:
Setting SET TEXTSIZE affects the @@TEXTSIZE function.
The DB-Library variable DBTEXTLIMIT also limits the size of text data
returned with a SELECT statement. If DBTEXTLIMIT is set to a smaller
size than TEXTSIZE, only the amount specified by DBTEXTLIMIT is
returned. For more information, see "Programming DB-Library for C" in
SQL Server Books Online.
The SQL Server ODBC driver and Microsoft OLE DB Provider for SQL Server
automatically set TEXTSIZE to 2147483647 when connecting.
The setting of set TEXTSIZE is set at execute or run time and not at
parse time.
------------------------------------------------------------------------
[2009-07-27 10:52:45] danhen at web dot de
When using PDO_MSSQL with PHP 5.3 (Not PDO_ODBC - queries aren't
compatible in many cases - especially those with placeholders)
pdo::query(SET TEXTSIZE 2147483647) works fine with MSSQL 2008. PDO_ODBC
isn't a good replacement.
------------------------------------------------------------------------
[2009-03-20 22:17:01] [email protected]
Should all work as advertised from 5.2.10 up.
Now to go change the advertising ;)
- Steph
------------------------------------------------------------------------
[2009-02-15 22:30:36] janpolsen at gmail dot com
Thanks for the fast response.
I will try to see how my scripts run when using the ODBC driver instead
:).
------------------------------------------------------------------------
[2009-02-13 19:24:48] [email protected]
On further analysis, it seems SET_TEXTSIZE doesn't work even when you
set it explicitly.
I have a working fix for this, but no telling when it'll get into CVS
as I have to install an entirely new second build environment for PHP
5.3 before I can commit it.
The documentation comment still holds, and setting the textsize works
for all related extensions except pdo_dblib (AKA pdo_mssql.dll).
Best workaround: use PDO_ODBC to connect to MSSQL Server instead.
//$dsn = 'mssql:host=MYBOX;dbname=testdb';
$dsn = 'odbc:DRIVER={SQL Server};SERVER=MYBOX;DATABASE=testdb;';
HTH
- Steph
------------------------------------------------------------------------
The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
http://bugs.php.net/38805
--
Edit this bug report at http://bugs.php.net/?id=38805&edit=1