Bug #50555 [Com]: PDO_DBLIB: Cannot retrieve output parameter from stored procedure
| From: | adambaratz@php.net | Date: | Mon, 12 Sep 2016 22:01:28 +0000 |
| Subject: | Bug #50555 [Com]: PDO_DBLIB: Cannot retrieve output parameter from stored procedure | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-203982@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=50555&edit=1
ID: 50555
Comment by: adambaratz@php.net
Reported by: david dot wright at opticsplanet dot com
Summary: PDO_DBLIB: Cannot retrieve output parameter from
stored procedure
Status: Open
Type: Bug
Package: PDO DBlib
Operating System: 2.6.24-24-server
PHP Version: 5.3.1
Block user comment: N
Private report: N
New Comment:
Alternate test case in #70274.
Previous Comments:
------------------------------------------------------------------------
[2016-02-16 11:12:36] craig_carnell at hotmail dot com
I am experiencing the same issue with PHP 7.0.3, pdo_dblib and MSSQL 2008. Unfortunately I am having
to resort to pdo_dblib due to the removal of mssql* functions.
Here is my code:
$db = new PDO('dblib:host=myhost:1433;dbname=mydb', 'username',
'password');
$db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
$sql = "EXEC Stock_Level @myId=:myId, @StockLevel=:StockLevel";
$stmt = $db->prepare($sql);
$var = '12345';
$var2 = null;
$stmt->bindParam(":myId", $var, PDO::PARAM_STR);
$stmt->bindParam(":StockLevel", $var2, PDO::PARAM_INT|PDO::PARAM_INPUT_OUTPUT);
if(!$stmt->execute()) {
echo "\nPDO::errorCode(): ", $stmt->errorCode();
}
echo "var 2 = " . $var2 . PHP_EOL;
This is a big problem!
------------------------------------------------------------------------
[2016-02-12 13:14:34] g at thelettereyediversity dot co dot za
Working with the latest PHP 5.6 and MySQL 5.6.22 and can confirm this is still a bug and affects the
PDO library.
------------------------------------------------------------------------
[2014-05-17 09:05:05] eugene at bcp dot im
This bug/problem whatever you want to call it is not limkted to DBlib - happening on ODBC and
SqlServer... Is anyone looking into this??
------------------------------------------------------------------------
[2010-09-18 21:34:04] ssufficool@php.net
This requires that pdo_dblib pass params using the RPC mechanisms and also to implement it's
own driver level binding instead of relying on the PDO param binding. This will require a rewrite of
most of the statement object.
Rest assured, it is being worked on but may take some time.
------------------------------------------------------------------------
[2010-04-09 10:50:34] a at exampl dot com
For fucks sake would anybody already fix this? It's not the only report about this issue in the
tracker.
------------------------------------------------------------------------
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
https://bugs.php.net/bug.php?id=50555
--
Edit this bug report at https://bugs.php.net/bug.php?id=50555&edit=1