Doc #55083 [NEW]: working with varbinary on mssql
| From: | aznboy84 at gmail dot com | Date: | Thu, 30 Jun 2011 08:24:28 +0000 |
| Subject: | Doc #55083 [NEW]: working with varbinary on mssql | ||
| Groups: | php.doc.bugs | ||
| Request: | Send a blank email to doc-bugs+get-6775@lists.php.net to get a copy of this message | ||
From:
Operating system: Windows XP x64
PHP version: 5.3.6
Package: MSSQL related
Bug Type: Documentation Problem
Bug description:working with varbinary on mssql
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 bug report at https://bugs.php.net/bug.php?id=55083&edit=1
--
Try a snapshot (PHP 5.2): https://bugs.php.net/fix.php?id=55083&r=trysnapshot52
Try a snapshot (PHP 5.3): https://bugs.php.net/fix.php?id=55083&r=trysnapshot53
Try a snapshot (trunk): https://bugs.php.net/fix.php?id=55083&r=trysnapshottrunk
Fixed in SVN: https://bugs.php.net/fix.php?id=55083&r=fixed
Fixed in SVN and need be documented: https://bugs.php.net/fix.php?id=55083&r=needdocs
Fixed in release: https://bugs.php.net/fix.php?id=55083&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=55083&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=55083&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=55083&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=55083&r=support
Expected behavior: https://bugs.php.net/fix.php?id=55083&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=55083&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=55083&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=55083&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=55083&r=php4
Daylight Savings: https://bugs.php.net/fix.php?id=55083&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=55083&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=55083&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=55083&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=55083&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=55083&r=mysqlcfg
Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=55083&r=trysnapshot54