11.01.2013 Views

Oracle Forms Developer – Form Builder Reference, Volume 1

Oracle Forms Developer – Form Builder Reference, Volume 1

Oracle Forms Developer – Form Builder Reference, Volume 1

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

On-Fetch trigger examples<br />

This example calls a client-side package function to retrieve the proper number of rows from a package<br />

cursor.<br />

DECLARE<br />

j NUMBER := Get_Block_Property(blk_name, RECORDS_TO_FETCH);<br />

emprow emp%ROWTYPE;<br />

BEGIN<br />

FOR ctr IN 1..j LOOP<br />

/*<br />

** Try to get the next row.<br />

*/<br />

EXIT WHEN NOT MyPackage.Get_Next_Row(emprow);<br />

Create_Queried_Record;<br />

:Emp.rowid := emprow.ROWID;<br />

:Emp.empno := emprow.EMPNO;<br />

:Emp.ename := emprow.ENAME;<br />

:<br />

:<br />

END LOOP;<br />

IF form_fatal OR form_failure THEN<br />

raise form_trigger_failure;<br />

END IF;<br />

END;<br />

447

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!