php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #33496 Problem in calling to the Oracle procedure
Submitted: 2005-06-28 03:01 UTC Modified: 2005-06-28 09:07 UTC
From: opintosalazar at terra dot cl Assigned:
Status: Not a bug Package: OCI8 related
PHP Version: 5.0.4 OS: Windows 2003 Server
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: opintosalazar at terra dot cl
New email:
PHP Version: OS:

 

 [2005-06-28 03:01 UTC] opintosalazar at terra dot cl
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
 


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2005-06-28 09:07 UTC] sniper@php.net
Sorry, but your problem does not imply a bug in PHP itself.  For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system is not the
appropriate forum for asking support questions.  Due to the volume
of reports we can not explain in detail here why your report is not
a bug.  The support channels will be able to provide an explanation
for you.

Thank you for your interest in PHP.


 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat May 11 07:01:32 2024 UTC