I am failing in an attempt to access an Oracle database using the
following php.
The calls I have tested are as follows:-
$query = "begin
spPackage.spMemberDetails(:p_number,:cv_memberdetails); end;";
$stmt = OCIParse($conn, $query )
or die('Cannot parse query');
OCIBindByName($stmt,":p_number",$number, -1)
or die('First cannot bind variable');
OCIBindByName($stmt, ":cv_memberdetails", &$array, -1)
or die('Second cannot bind variable');
$query = "begin spPackage.spMemberDetails(:p_number); end;";
$stmt = OCIParse($conn, $query )
or die('Cannot parse query');
OCIBindByName($stmt,":p_number",$number, -1)
or die('First cannot bind variable');
I get the following error message:-
ORA-06550: line 1, column 7: PLS-00306: wrong number or types of
arguments in call to 'SPMEMBERDETAILS' ORA-06550: line 1, column 7:
PL/SQL: Statement ignored
begin spPackage.spMemberDetails(:p_number); end;
^
The 1st part of the stored procedure I am trying to use is as follows:-
CREATE OR REPLACE PACKAGE "BIG"."SPPACKAGE" AS
type memberdetail_type is record (
r_mem_number members.mem_number%type,
r_mem_sname members.mem_sname%type,
r_mem_fname members.mem_fname%type,
r_mem_title members.mem_title%type);
type memberdetail_cur_type is ref cursor return memberdetail_type;
PROCEDURE spMemberDetails(
p_number cards.card_number%type, --varchar2
cv_memberdetails out memberdetail_cur_type);
Please tell me what I am not understanding and where I have gone wrong.
BTW I did not write the stored procedure.
--
Regards,
Alf Stockton www.stockton.co.za
Linux 2.6.12-10-386
You will pioneer the first Martian colony.
My email disclaimer is available at www.stockton.co.za/disclaimer.html
--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php