Hi!
I have a problem (for me it is).
The problem is:
Can磘 execute a statement that calls a stored procedure in a package that gives a ref cursor back that returns records.
Faultycode:
Oracle error=\\\'ORA-24370\\\'
The php code:
$stmt = OCIParse($conn,\\\"begin bl_orderrow.get_orderrowsdata,:kundnr,:hit); end;\\\");
$curs = OCINewCursor($conn);
if (($oraerr=OCIError($stmt))){
oracleerror($oraerr,$conn);
return 1;
}
OCIBindByName($stmt,\\\":kundnr\\\",&$kundnr,-1);
OCIBindByName($stmt,\\\":hit\\\",&$hit,-1);
ocibindbyname($stmt,\\\":data\\\",&$curs,-1,OCI_B_CURSOR);
ociexecute($stmt,OCI_DEFAULT );
if (($oraerr=OCIError($stmt))){
oracleerror($oraerr,$conn);
return 1;
}
ociexecute($curs,OCI_DEFAULT);
if (($oraerr=OCIError($stmt))){
oracleerror($oraerr,$conn);
return 1;
}
while (OCIFetchInto($curs,&$resultdata)) {
if (($oraerr=OCIError($stmt))){
oracleerror($oraerr,$conn);
return 1;
}
printf(\\\"%s\\\\n\\\",$data[ordernr]);
}
OCIFreeCursor($curs);
OCIFreeStatement($stmt);
return 0;
Oracle:
client 8.0.5
db 7.3.4
Package LITTINFO.BL_ORDERROW
IS
TYPE orderrowrec IS RECORD(
ordernr BL_ORDER.ORDERNR%TYPE,
orderradnr BL_ORDER.ORDERRADNR%TYPE,
ordertext BL_ORDER.ORDERTEXT%TYPE,
kopia_fax CHAR(4),
upphovsrett CHAR(3),
orderkod BL_ORDER.ORDERKOD%TYPE,
orderdatum BL_ORDER.ORDERDATUM%TYPE,
statuskod BL_ORDER.STATUSKOD%TYPE,
statusdatum BL_ORDER.STATUSDATUM%TYPE);
TYPE ordercurtype IS REF CURSOR RETURN orderrowrec;
PROCEDURE get_orderrows(ordercur in out ordercurtype,kundnr in char, hit IN NUMBER ) ;
end;
I would appriciate a hint about the error. The stored procedures is OK.
Thanks in advance.
I have a problem (for me it is).
The problem is:
Can磘 execute a statement that calls a stored procedure in a package that gives a ref cursor back that returns records.
Faultycode:
Oracle error=\\\'ORA-24370\\\'
The php code:
$stmt = OCIParse($conn,\\\"begin bl_orderrow.get_orderrowsdata,:kundnr,:hit); end;\\\");
$curs = OCINewCursor($conn);
if (($oraerr=OCIError($stmt))){
oracleerror($oraerr,$conn);
return 1;
}
OCIBindByName($stmt,\\\":kundnr\\\",&$kundnr,-1);
OCIBindByName($stmt,\\\":hit\\\",&$hit,-1);
ocibindbyname($stmt,\\\":data\\\",&$curs,-1,OCI_B_CURSOR);
ociexecute($stmt,OCI_DEFAULT );
if (($oraerr=OCIError($stmt))){
oracleerror($oraerr,$conn);
return 1;
}
ociexecute($curs,OCI_DEFAULT);
if (($oraerr=OCIError($stmt))){
oracleerror($oraerr,$conn);
return 1;
}
while (OCIFetchInto($curs,&$resultdata)) {
if (($oraerr=OCIError($stmt))){
oracleerror($oraerr,$conn);
return 1;
}
printf(\\\"%s\\\\n\\\",$data[ordernr]);
}
OCIFreeCursor($curs);
OCIFreeStatement($stmt);
return 0;
Oracle:
client 8.0.5
db 7.3.4
Package LITTINFO.BL_ORDERROW
IS
TYPE orderrowrec IS RECORD(
ordernr BL_ORDER.ORDERNR%TYPE,
orderradnr BL_ORDER.ORDERRADNR%TYPE,
ordertext BL_ORDER.ORDERTEXT%TYPE,
kopia_fax CHAR(4),
upphovsrett CHAR(3),
orderkod BL_ORDER.ORDERKOD%TYPE,
orderdatum BL_ORDER.ORDERDATUM%TYPE,
statuskod BL_ORDER.STATUSKOD%TYPE,
statusdatum BL_ORDER.STATUSDATUM%TYPE);
TYPE ordercurtype IS REF CURSOR RETURN orderrowrec;
PROCEDURE get_orderrows(ordercur in out ordercurtype,kundnr in char, hit IN NUMBER ) ;
end;
I would appriciate a hint about the error. The stored procedures is OK.
Thanks in advance.