Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> ref cursor resultset in forms trigger - How do you do it?

ref cursor resultset in forms trigger - How do you do it?

From: steve deno <sldcrew2k_at_yahoo.com>
Date: 18 Jan 2003 15:56:43 -0800
Message-ID: <8e6b14d8.0301181556.27ab038f@posting.google.com>


I have a function that returns a ref cursor. I would like to take values from it and loop through them in a forms trigger. I can't seem to make it work. Can anyone help? I am in forms v.6 and Oracle 9i database. I'll show my first attempt at it below. Help is really appreciated.

Here is the function declaration:

CREATE OR REPLACE FUNCTION getZips(

    m_seedZipcode IN char,
    m_milesRadius IN number)
  RETURN
    package.cursorType

So I attempted the following in the trigger It compiles with the commented section commented out, but not with it in.

DECLARE
SEARCH_WHERE_CLAUSE varchar2(1000) := 'WHERE zip IS NOT NULL ';

type zipresults is ref cursor;
zipresultset zipresults;
BEGIN zipresultset := getzips(:search_block.zip_search,50) ;
-- LOOP
--exit when zipresultset%not_found;
--SEARCH_WHERE_CLAUSE :=

SEARCH_WHERE_CLAUSE||'and zip IN( '''||zipresultset.zip||')''' ;
-- END LOOP;
end;

Heeelp! Received on Sat Jan 18 2003 - 17:56:43 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US