Question
CFSTORED_PROC
What is wrong with this Stored Proc ? It works fine in
sqlplus but not with a CF call..I have created a simple Hello proc
, and called from CF it works fine...Any help ? Thanks.
Attach Code
::::::::::::The CF call ::::::::::::::::::
<CFSTOREDPROC DATASOURCE="#FormVector#" PROCEDURE="your_pkg.your_proc" returncode="yes">
<CFPROCPARAM TYPE="IN" CFSQLTYPE="CF_SQL_NUMERIC" VALUE="2" NULL="No">
<CFPROCRESULT NAME="view">
</CFSTOREDPROC>
<cfdump var="#view#">
::::::::::::::The proc::::::::::::
CREATE OR REPLACE PACKAGE your_pkg IS
-- Global declaration for ref_cursor
TYPE ref_cur_type
IS REF CURSOR;
PROCEDURE your_proc(in_id IN NUMBER, out_rec OUT ref_cur_type);
END your_pkg;
/
CREATE OR REPLACE PACKAGE BODY your_pkg IS
PROCEDURE your_proc(in_id IN NUMBER, out_rec OUT ref_cur_type)
IS
BEGIN
OPEN out_rec
FOR
SELECT *
FROM BPAR
WHERE UN = in_id;
END your_proc;
END your_pkg;
/
Attach Code
::::::::::::The CF call ::::::::::::::::::
<CFSTOREDPROC DATASOURCE="#FormVector#" PROCEDURE="your_pkg.your_proc" returncode="yes">
<CFPROCPARAM TYPE="IN" CFSQLTYPE="CF_SQL_NUMERIC" VALUE="2" NULL="No">
<CFPROCRESULT NAME="view">
</CFSTOREDPROC>
<cfdump var="#view#">
::::::::::::::The proc::::::::::::
CREATE OR REPLACE PACKAGE your_pkg IS
-- Global declaration for ref_cursor
TYPE ref_cur_type
IS REF CURSOR;
PROCEDURE your_proc(in_id IN NUMBER, out_rec OUT ref_cur_type);
END your_pkg;
/
CREATE OR REPLACE PACKAGE BODY your_pkg IS
PROCEDURE your_proc(in_id IN NUMBER, out_rec OUT ref_cur_type)
IS
BEGIN
OPEN out_rec
FOR
SELECT *
FROM BPAR
WHERE UN = in_id;
END your_proc;
END your_pkg;
/
