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
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please — but make sure to vote on the bug!
Your email address:
MUST BE VALID
Solve the problem:
44 - 7 = ?
Subscribe to this entry?

 
 [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

Add a Patch

Pull Requests

Add a Pull Request

 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 19 21:01:30 2024 UTC