ID:               39707
 Updated by:       [EMAIL PROTECTED]
 Reported By:      aspen dot olmsted at alliance dot biz
-Status:           Open
+Status:           Assigned
 Bug Type:         PDO related
 Operating System: Windows XP SP2
 PHP Version:      5.2.0
-Assigned To:      
+Assigned To:      wez


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

[2006-12-01 18:50:41] aspen dot olmsted at alliance dot biz

The line that says:
 $sth = $dbh->prepare("EXECUTE spReturn_Int ?");
should be:
 $sth = $dbh->prepare("EXECUTE spReturn_Int ?,?");

Sorry when I simplified the example I made this mistake

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

[2006-12-01 18:00:40] aspen dot olmsted at alliance dot biz

Description:
------------
I am trying to pass output parameters to MSSQL through PDO using the
odbc driver.

If there is just one parameter it works.  If there is more than one it
will not.

There is a sample to send an inout parameter to SQL on the pdo
documentation page I used as a starting place

Reproduce code:
---------------
SQL:

ALTER PROCEDURE spReturn_Int @err int OUTPUT, @err2 varchar(255)
AS
SET @err = 11

  $sth = $dbh->prepare("EXECUTE spReturn_Int ?");
  $invalue = 'Dog';
  $sth->bindParam(1, $return_value,
PDO::PARAM_INT|PDO::PARAM_INPUT_OUTPUT);
  $sth->bindParam(2, $invalue, PDO::PARAM_STR);
  $sth->execute();
  print "procedure returned $return_value\n";


Expected result:
----------------
It should print "procedure returned 11"

Actual result:
--------------
It prints "procedure returned 


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


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

Reply via email to