#38805 [Com]: PDO Truncates Text from SQL Server Text Data Type Field

From: Date: Fri, 21 Nov 2008 14:57:05 +0000
Subject: #38805 [Com]: PDO Truncates Text from SQL Server Text Data Type Field
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-131166@lists.php.net to get a copy of this message
ID: 38805 Comment by: andrew dot henze 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: wez New Comment: Still having the same problem. Anyone have any news? Previous Comments: ------------------------------------------------------------------------ [2008-11-20 06:56:56] gmtfn at yahoo dot com Maybe wez is dead or is no longer associated with the PHP community for another reason. If this bug is still present, try filing a new issue. Maybe it will get assigned to somebody who can help. ------------------------------------------------------------------------ [2008-10-14 22:31:17] mario dot estrada at gmail dot com Come on guys, please fix this! This is a MAJOR bug and it seems like you really don't care! ------------------------------------------------------------------------ [2008-09-19 12:49:17] J dot Antonio at jaruz dot com This issue is now more then TWO YEARS old. Can "wez" please have a look at it? ------------------------------------------------------------------------ [2008-09-18 14:04:18] chinnet at 126 dot com My php version is 5.2.3. Now,I use PDO_MSSQL read the image type data from SQL Server 2000. But i only get 4096B from the db. so what can i do? ; Valid range 0 - 2147483647. Default = 4096. mssql.textlimit = 2147483647 ; Valid range 0 - 2147483647. Default = 4096. mssql.textsize = 2147483647 This is supported by php_mssql.dll.But not supported by PDO_MSSQL! so it is very important! ------------------------------------------------------------------------ [2008-08-04 12:40:00] gkrajci at arescorporation dot com Trying $pdo->query('SET TEXTSIZE {number}'); did not work... $dbh = new PDO($pdo_dsn, $db_user, $db_password); $sql = "SELECT the_content, DATALENGTH(the_content) AS d_l FROM content WHERE content_id = 578"; $dbh->query('SET TEXTSIZE 300000'); $stmt = $dbh->prepare($sql); $stmt->execute(); while ( $row = $stmt->fetch() ) { $video_count++; echo 'LENGTH: '.strlen($row["the_content"]).', '.$row["d_l"].'<br />'; } OUTPUT: LENGTH: 4096, 24868 ------------------------------------------------------------------------ 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

« previous php.bugs (#131166) next »