php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #38791 oci_new_collection is working incorrectly
Submitted: 2006-09-12 14:39 UTC Modified: 2006-09-12 16:36 UTC
From: ces dot fci at gmail dot com Assigned: tony2001 (profile)
Status: Not a bug Package: OCI8 related
PHP Version: 5.1.6 OS: any
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: ces dot fci at gmail dot com
New email:
PHP Version: OS:

 

 [2006-09-12 14:39 UTC] ces dot fci at gmail dot com
Description:
------------
I am trying to use oci_new_collection but I have not yet had any success.  I have only been able to test it up to PHP 5.1.4.  I found a post on Google Groups that suggests "it works only for VARRAY types"(Mladen Gogala).

Reproduce code:
---------------
$dbh = oci_connect('apps', '..', "(DESCRIPTION =  (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(Host = ..)(Port = 1522))) (CONNECT_DATA =(SID = test)))");

oci_new_collection($dbh, 'HZ_PARTY_SEARCH.CONTACT_POINT_LIST', 'APPS');


In PL/SQL the collection is declared as:
TYPE contact_point_list IS TABLE OF contact_point_search_rec_type
     INDEX BY BINARY_INTEGER;

TYPE contact_point_search_rec_type IS RECORD (
   CONTACT_POINT_TYPE     	VARCHAR2(30)    -- HZ_CONTACT_POINTS
  ,CPT_SOURCE_SYSTEM_REF	VARCHAR2(4000)  -- CUSTOM
  ,TELEPHONE_TYPE               VARCHAR2(30)    -- HZ_CONTACT_POINTS
  ,TELEX_NUMBER                 VARCHAR2(50)    -- HZ_CONTACT_POINTS
  /*  . . . */
  ,WEB_TYPE                     VARCHAR2(60)    -- HZ_CONTACT_POINTS
  ,STATUS                       VARCHAR2(1)     -- HZ_CONTACT_POINTS
  ,CONTACT_POINT_PURPOSE        VARCHAR2(30)    -- HZ_CONTACT_POINTS
);




Expected result:
----------------
I do not expect to experience any errors.

Actual result:
--------------
Warning:  oci_new_collection() [function.oci-new-collection]: OCI-22303: type "APPS"."HZ_PARTY_SEARCH.CONTACT_POINT_LIST" not found in C:\wamp\www\test.php on line 18

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2006-09-12 16:36 UTC] tony2001@php.net
Unfortunately, Oracle considers all types declared in the package as arrays, not collections.
So you have to use oci_bind_array_by_name() to work with them.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Dec 27 15:01:29 2024 UTC