Basic HTML version of Foils prepared June 30 1996

Foil 126 The PL/SQL Package For Phone Example - II

From A Tutorial on Base Web Technologies CRPC Annual Meeting/NASA Langley/Trip to China -- May 14-17 June 10-13 1996 July 12-18 1996. by Geoffrey Fox


BEGIN
  • htp.htitle('Query Results');
  • htp.ulistOpen;
  • OPEN person_cur(name); -- open the cursor
  • LOOP; -- Fetch each row matching the query into variables repeatedly
  • FETCH person_cur INTO lname,fname,phone,ptype;
  • EXIT WHEN person_cur%NOTFOUND; -- check end of result buffer
/* print out the query result */
htp.p(htp.item||'The ' || ptype ||' phone no. of ' || fname || ' '
|| lname || ': ' || phone);
END LOOP;
CLOSE person_cur; -- close the cursor after it is done
htp.ulistClose;
END get_person_by_name;
END EXAMPLE;



© Northeast Parallel Architectures Center, Syracuse University, npac@npac.syr.edu

If you have any comments about this server, send e-mail to webmaster@npac.syr.edu.

Page produced by wwwfoil on Sun Dec 14 1997