Doc #55083 [Opn->Bgs]: working with varbinary on mssql

From: Date: Fri, 01 Jul 2011 20:29:37 +0000
Subject: Doc #55083 [Opn->Bgs]: working with varbinary on mssql
References: 1  Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-6785@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=55083&edit=1 ID: 55083 Updated by: frozenfire@php.net Reported by: aznboy84 at gmail dot com Summary: working with varbinary on mssql -Status: Open +Status: Bogus Type: Documentation Problem Package: MSSQL related Operating System: Windows XP x64 PHP Version: 5.3.6 Block user comment: N Private report: N New Comment: The PDO MSSQL driver is known to be very buggy, and has been replaced by the sqlsrv extension. If you must use PDO for MSSQL, you might try using the ODBC driver. In any case, this isn't a documentation issue. Previous Comments: ------------------------------------------------------------------------ [2011-06-30 04:24:28] aznboy84 at gmail dot com Description: ------------ I have a MSSQL table with a varbinary(5600) field and i found no way to get it with PDO, got "Invalid sql_display_size" on $stmt->fetch() <?php date_default_timezone_set("Asia/Saigon"); require "connect.php"; $stmt = $MSSQL->prepare("SELECT SCFS5Quest FROM SCFS5Quest WHERE Name = 'hack'"); $stmt->execute(array('hack')); $stmt->bindColumn(1, $lob, PDO::PARAM_LOB,1,PDO::SQLSRV_ENCODING_BINARY); $stmt->fetch(PDO::FETCH_BOUND); //print_r($scf); echo bin2hex($scf); ?> Test script: --------------- <?php date_default_timezone_set("Asia/Saigon"); require "connect.php"; $stmt = $MSSQL->prepare("SELECT SCFS5Quest FROM SCFS5Quest WHERE Name = 'hack'"); $stmt->execute(array('hack')); $stmt->bindColumn(1, $lob, PDO::PARAM_LOB,1,PDO::SQLSRV_ENCODING_BINARY); $stmt->fetch(PDO::FETCH_BOUND); //print_r($scf); echo bin2hex($scf); ?> ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=55083&edit=1

« previous php.doc.bugs (#6785) next »