ID:               13195
 Comment by:       nicolas dot karageuzian at clubmed dot com
 Reported By:      martinrosenauer at hotmail dot com
 Status:           Open
 Bug Type:         Feature/Change Request
 Operating System: Linux
 PHP Version:      4.0.6
 New Comment:

Hi, we tried the following example :
<?php
  $proc_qry = "CALL CM.CLIBROS(? , ? , ?)";
  $dbconn = dbconnect();
  $proc_stmt = odbc_prepare($dbconn,$proc_qry);
  $codFon = 0;
  $codPYC = "010";
  $codRet = "";
  $values = array ($codFon,$codPYC,$codRet);
  $result = odbc_execute($proc_stmt,$values) ;
  while(odbc_fetch_row($result)){
    for($i=1;$i<=odbc_num_fields($result);$i++){
       echo "colonne ".i." : ".odbc_result($result,$i);
    } //for
  } //while

the third parameter of CLIBROS stored procedure is an output parameter.
PHP reported this error :
 [error] PHP Warning:  odbc_execute(): SQL error: [IBM][CLI Driver]
CLI0005W  Option value changed. SQLSTATE=01S02, SQL state 01S02 in
SQLExecute in testPRS.php on line 31

we didn't find how to register an output parameter for the statement.


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

[2001-09-07 11:23:23] martinrosenauer at hotmail dot com

As of now the odbc-wrapper, for example used with DB2 databases,
support calling stored procedures. It supports IN parameters used with
stored procedures as well, but not OUT parameters (meaning you can get
parameters returned to PHP when calling a stored procedure). 

This is for example possible when using Perl and DBI (against DB2). The
method there that enables it is called Bind (where you bind a var to an
out parameter). Unfortunately this method is not available as
odbc_bind. 

If this is by any chance possible I'd be more than happy!

I had a brief dialog with Frank Kromann ([EMAIL PROTECTED]), who was
involved with the ODBC wrapper implementation and he confirmed that a
binding or OUT parameter support was already there.

Best regards and thanks a mill,

Martin Jacobsen, Denmark

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


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

Reply via email to