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:identifier' <User>.<Procedure 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:
Expand|Select|Wrap|Line Numbers
- 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:
Expand|Select|Wrap|Line Numbers
- 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(<login>, <pwd>, <service name>);
$s = oci_parse($con, 'BEGIN tag_data.tag_getall(:rst); END;');
$rst = oci_new_cursor($con);
oci_bind_by_name($s, ":rst", $rst, -1, OCI_B_CURSOR);
oci_execute($s);[/PHP]
The last step results in the PLS-00201 error on tag_data.tag_getall
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