Bug #50555 [Com]: PDO_DBLIB: Cannot retrieve output parameter from stored procedure

From: Date: Sat, 17 May 2014 09:05:05 +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-185844@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:         eugene at bcp dot im
 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:

This bug/problem whatever you want to call it is not limkted to DBlib - happening on ODBC and
SqlServer... Is anyone looking into this??


Previous Comments:
------------------------------------------------------------------------
[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.

------------------------------------------------------------------------
[2009-12-22 22:09:39] david dot wright at opticsplanet dot com

Description:
------------
I cannot retrieve an output parameter from a stored procedure (in my case on SQL Server 2005--am
using PDO_DBLIB.

Reproduce code:
---------------
PHP Code:
---------------------------------------------------
/** SNIP. Set up a valid $db here! **/
$return_value = 999;
$sth = $db->prepare("EXEC dbo.opsp_Test ?");
$sth->bindParam(1, $return_value, PDO::PARAM_STR |
PDO::PARAM_INPUT_OUTPUT, 4);
$sth->execute();
echo "$return_value\n";

Stored Procedure
--------------------------------------------------
CREATE PROCEDURE opsp_Test 
	@TheOutputValue int OUTPUT
AS
BEGIN
	SET @TheOutputValue = 11
END



Expected result:
----------------
output should be: 11

Actual result:
--------------
Output is 999 ($return_value unchanged)


------------------------------------------------------------------------



-- 
Edit this bug report at https://bugs.php.net/bug.php?id=50555&edit=1


Thread (15 messages)

« previous php.bugs (#185844) next »