I am using a reference cursor in TOAD that compiles just fine with no error, but it causes an unpredictable error that gets the page that I’m loading to bom-b out with a 404 error. The log that gets generated points to the line in my code where I open the cursor. I tried using a template cursor instead of the record and got the same result. Keep in mind that I was able to get it to the point of compiling, so there are no technical bugs in the code. That is what makes it difficult. Here is what the code for the cursor looks like: (copy and paste it into notepad for better visibility)
v_testCur varchar2(32767) := ‘SELECT …;’;
…
…
/create ref cursor type, then create variables of this type/
TYPE rc IS REF CURSOR;
cur_docs_found rc;
…
TYPE cur_docs_template IS RECORD (
testkey doc_view_hcas.dockey%TYPE
);
i cur_docs_template;
BEGIN
…
OPEN cur_docs_found FOR v_testCur;
LOOP
FETCH cur_docs_found INTO i;
EXIT WHEN cur_docs_found%NOTFOUND;
…
END Loop;
CLOSE cur_docs_found;
END;
/
I need professional help, so please give me some ideas if you are a debugging expert. The rest of my team couldn’t figure it out either. They are clueless!