ID: 38805 Comment by: ssufficool at gmail dot com Reported By: gkrajci at arescorporation dot com Status: Assigned Bug Type: PDO related Operating System: Windows NT PBMA-WB2 5.2 build 37 PHP Version: 5.1.6 Assigned To: sfox New Comment:
I imagine the problem is that PDO DBLIB just mem-copies the first packet of TEXT without calling dbgettext() to retrieve the remainder. MSSQL handles TEXT fields using dbconvert() which may call dbgettext() downstream. Possible fix: remove "case SQLTEXT" from ext/pdo_dblib/dblib_stmt.c:execute and let it fall though to default. Previous Comments: ------------------------------------------------------------------------ [2010-01-10 23:22:50] [email protected] Steph, does this need any additional changes to pdo_mssql/pdo_dblib? And what exactly should be documented? ------------------------------------------------------------------------ [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 :). ------------------------------------------------------------------------ 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
