From:             opintosalazar at terra dot cl
Operating system: Windows 2003 Server
PHP version:      5.0.4
PHP Bug Type:     OCI8 related
Bug description:  Problem in calling to the Oracle procedure

Description:
------------
At the moment PHP, works very or, yet type of consultations towards the
data base oracle, but something exists, that I have not been able to make
work, or not this supported by PHP, that is what desire to know.

I have a pack in Oracle:

CREATE PACKAGE Prov_Pkg 
AS 
  TYPE tblEName IS TABLE OF VARCHAR2(130) INDEX BY   BINARY_INTEGER; 

PROCEDURE Prov 
   (o_EName OUT tblEName) 
END Prov_pkg;

CREATE PACKAGE BODY Prov_Pkg 
AS 
PROCEDURE Prov 
   (o_EName OUT tblEName) 
IS
CURSOR cur_employee IS 
      SELECT razon_social 
      FROM Proveedores;
      RecordCount NUMBER DEFAULT 0;
BEGIN 
      FOR curRecProv IN cur_prov LOOP 
         RecordCount:= RecordCount + 1; 
         o_EName(RecordCount):= curRecProv.razon_social; 
      END LOOP; 
   END Prov; 
END Prov_Pkg;

This is everything what I have in oracle, a procedure and a package This
returns a collection to me type table, not a cursor, and I have not been
able to make it work with PHP, however with ASP, this he is very facil,
desire to know, if PHP, supports this



Reproduce code:
---------------
$sql = "Begin Prov_pkg.Prov(:o_EName);End;";
        
$stmt   = OCIParse($conn,$sql);
          OCIBindByName($stmt,':o_EName',$o_EName);
          OCIExecute($stmt);
  echo $o_EName->getelem(0);

it does not work

a comparison of the competition that if it does

set cm = server.createobject("adodb.command")
         cm.activeconnection = conexion
       
         cm.commandtext = "{call PROV_PKG.PROV({resultset 9,o_EName})}" 
         cm.commandtype = &H0001

     set reg = server.createobject("adodb.recordset")
         reg.activeconnection = conexion
         reg.cursortype = 3
     set reg.source = cm
         reg.open
 
         largo = 0 
         response.write "salida<br>"
         do while not reg.eof
                        
             response.write reg("o_EName") & "<br>"
             reg.movenext
         loop
 


-- 
Edit bug report at http://bugs.php.net/?id=33496&edit=1
-- 
Try a CVS snapshot (php4):   http://bugs.php.net/fix.php?id=33496&r=trysnapshot4
Try a CVS snapshot (php5.0): 
http://bugs.php.net/fix.php?id=33496&r=trysnapshot50
Try a CVS snapshot (php5.1): 
http://bugs.php.net/fix.php?id=33496&r=trysnapshot51
Fixed in CVS:                http://bugs.php.net/fix.php?id=33496&r=fixedcvs
Fixed in release:            http://bugs.php.net/fix.php?id=33496&r=alreadyfixed
Need backtrace:              http://bugs.php.net/fix.php?id=33496&r=needtrace
Need Reproduce Script:       http://bugs.php.net/fix.php?id=33496&r=needscript
Try newer version:           http://bugs.php.net/fix.php?id=33496&r=oldversion
Not developer issue:         http://bugs.php.net/fix.php?id=33496&r=support
Expected behavior:           http://bugs.php.net/fix.php?id=33496&r=notwrong
Not enough info:             
http://bugs.php.net/fix.php?id=33496&r=notenoughinfo
Submitted twice:             
http://bugs.php.net/fix.php?id=33496&r=submittedtwice
register_globals:            http://bugs.php.net/fix.php?id=33496&r=globals
PHP 3 support discontinued:  http://bugs.php.net/fix.php?id=33496&r=php3
Daylight Savings:            http://bugs.php.net/fix.php?id=33496&r=dst
IIS Stability:               http://bugs.php.net/fix.php?id=33496&r=isapi
Install GNU Sed:             http://bugs.php.net/fix.php?id=33496&r=gnused
Floating point limitations:  http://bugs.php.net/fix.php?id=33496&r=float
No Zend Extensions:          http://bugs.php.net/fix.php?id=33496&r=nozend
MySQL Configuration Error:   http://bugs.php.net/fix.php?id=33496&r=mysqlcfg

Reply via email to