I'm having problems running an Oracle stored procedure
that returns a cursor to from a web front end. The problem
occurs both with PHP and ASP.NET.
The error is the familiar
"PLS-00201:identifie r' <User>.<Procedu re Name> ' must be declared"
Note: the procedure runs fine from sql*plus, so I know the spec
and body are ok.
The package spec and body are as follows:
As I noted, The procedure runs fine from sql*plus.
For instance, via this sequence of commands:
Following is a portion of the PHP I've used. (I can provide the ASP also.)
[PHP] $con = oci_connect(<lo gin>, <pwd>, <service name>);
$s = oci_parse($con, 'BEGIN tag_data.tag_ge tall(:rst); END;');
$rst = oci_new_cursor( $con);
oci_bind_by_nam e($s, ":rst", $rst, -1, OCI_B_CURSOR);
oci_execute($s) ;[/PHP]
The last step results in the PLS-00201 error on tag_data.tag_ge tall
Googling around suggests this is a permissions problem.
I have granted EXECUTE permission to the package to PUBLIC and ANONYMOUS, with no change.
Also: the login I'm using is the same that I use from sql*plus so presumably
the same permissions should apply, no?
Thanks
that returns a cursor to from a web front end. The problem
occurs both with PHP and ASP.NET.
The error is the familiar
"PLS-00201:identifie r' <User>.<Procedu re Name> ' must be declared"
Note: the procedure runs fine from sql*plus, so I know the spec
and body are ok.
The package spec and body are as follows:
Code:
CREATE OR REPLACE PACKAGE tag_data
AS
PROCEDURE tag_GetAll(rst OUT SYS_REFCURSOR);
END tag_data;
CREATE OR REPLACE PACKAGE BODY tag_data
AS
PROCEDURE tag_GetAll(rst OUT SYS_REFCURSOR)
AS
BEGIN
OPEN rst FOR SELECT * FROM Tag;
END;
END tag_data;
For instance, via this sequence of commands:
Code:
var rst refcursor; exec tag_data.tag_getall(:rst); print rst;
Following is a portion of the PHP I've used. (I can provide the ASP also.)
[PHP] $con = oci_connect(<lo gin>, <pwd>, <service name>);
$s = oci_parse($con, 'BEGIN tag_data.tag_ge tall(:rst); END;');
$rst = oci_new_cursor( $con);
oci_bind_by_nam e($s, ":rst", $rst, -1, OCI_B_CURSOR);
oci_execute($s) ;[/PHP]
The last step results in the PLS-00201 error on tag_data.tag_ge tall
Googling around suggests this is a permissions problem.
I have granted EXECUTE permission to the package to PUBLIC and ANONYMOUS, with no change.
Also: the login I'm using is the same that I use from sql*plus so presumably
the same permissions should apply, no?
Thanks
Comment