php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #74078 oci_new_collection not found
Submitted: 2017-02-10 14:55 UTC Modified: -
Votes:1
Avg. Score:5.0 ± 0.0
Reproduced:0 of 1 (0.0%)
From: raphgivernaud at yahoo dot fr Assigned:
Status: Open Package: OCI8 related
PHP Version: 5.6.30 OS: Windows
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: raphgivernaud at yahoo dot fr
New email:
PHP Version: OS:

 

 [2017-02-10 14:55 UTC] raphgivernaud at yahoo dot fr
Description:
------------
When trying to use the "oci_new_collection" function with "RECORD" of PL / SQL, the type is never found.

If we try to use "oci_bind_array_by_name" instead, as proposed in #38791, then the execution of the procedure returns that the type is bad or unknown.

Test script:
---------------
/* Oracle */
CREATE OR REPLACE PACKAGE OPS$AGIX1NSG.pk_g_v AS

TYPE T_V IS RECORD (
		nm       h1v.nm%TYPE,
		nmp      h1v.nmp%TYPE,
		no       h1v.no%TYPE,
		user     h1v.user%TYPE
       );

FUNCTION rech (pr_NO IN VARCHAR2, pr_DATE IN DATE, pr_V OUT T_V) RETURN NUMBER;

END pk_g_v;

/* Php */
$stid = oci_parse($conn, "begin :r_NBRESULT := pk_g_v.rech('3208010896', TO_DATE('27/01/2017', 'DD/MM/YYYY'), :pr_V); end;");

$pr_V = oci_new_collection($conn, 'T_V', 'PK_G_V');
oci_bind_by_name($stid, ':pr_V', $pr_V, -1, SQLT_REC);

oci_bind_by_name($stid, ':r_NBRESULT', $r_NBRESULT);



Actual result:
--------------
PHP Warning:  oci_new_collection(): OCI-22303: type "PK_G_V"."T_V" not found in ...

Patches

Pull Requests

 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Mon Oct 14 09:01:27 2024 UTC