ID:               43887
 Comment by:       david dot wright at opticsplanet dot com
 Reported By:      coldgrass at gmail dot com
 Status:           No Feedback
 Bug Type:         PDO related
 Operating System: *
 PHP Version:      5.2.6
 New Comment:

This is happening for me in 5.3.1., using Pdo_Dblib.  Trying to call a
stored procedure on SQL Server 2005 server.  Cannot retrieve a value.

PHP version 5.3.1
Using Pdo_Dblib
Linux:  2.6.24-24-server SMP x86_64 GNU/Linux

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";

Return value ALWAYS comes back as 999, no matter what variations I try
in bindParam call.

Here's my Stored Procedure:
---------------------------
CREATE PROCEDURE opsp_Test 
        @TheOutputValue int OUTPUT
AS
BEGIN
        SET @TheOutputValue = 11
END


Previous Comments:
------------------------------------------------------------------------

[2009-05-03 01:00:06] php-bugs at lists dot php dot net

No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".

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

[2009-04-25 14:54:04] j...@php.net

Please try using this CVS snapshot:

  http://snaps.php.net/php5.2-latest.tar.gz
 
For Windows:

  http://windows.php.net/snapshots/



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

[2008-11-26 22:39:06] aventurella at gmail dot com

forgot my php/OS version: 5.2.6 on OS X 10.5.5

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

[2008-11-26 22:37:50] aventurella at gmail dot com

I can confrim this on MySQL and PostgreSQL as well.  No
PARAM_INPUT_OUTPUT values get bound through PDO when running a stored 
procedure.

http://bugs.php.net/bug.php?id=46657

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

[2008-10-30 08:56:25] miha dot vrhovnik at domenca dot si

Can confirm this on Linux.

PHP 5.2.6, connecting to MSSQL 2000 via freetds 0.82RC4

Guys please fix that I had to revert back to mssql_* functions for
calling stored procedures. So Now half of project uses PDO the other
half the old functional style...

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

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/43887

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

Reply via email to