| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> c.d.o.server -> ref cursor resultset in forms trigger - How do you do it?
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
![]() |
![]() |