This discussion is archived
0 Replies Latest reply: Oct 30, 2012 8:52 PM by 829510 RSS

Execute the show_employees procedure through a URL

829510 Newbie
Currently Being Moderated
Hey! All

I have created simple.psp file:=>
<%@ page language="PL/SQL" %>
<%@ page contentType="text/html" %>
<%@ plsql procedure="show_employees" %>
<%-- This example displays the last name and first name of every
employee in the hr.employees table. --%>
<%!
CURSOR emp_cursor IS
SELECT last_name, first_name
FROM hr.employees
ORDER BY last_name;
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html">
<title>List of Employees</title>
</head>
<body TEXT="#000000" BGCOLOR="#FFFFFF">
List of Employees

<table width="40%" border="1">
<tr>
<th align="left">Last Name</th>
<th align="left">First Name</th>
</tr>
<% FOR emp_record IN emp_cursor LOOP %>
<tr>
<td> <%= emp_record.last_name %> </td>
<td> <%= emp_record.first_name %> </td>
</tr>
<% END LOOP; %>
</table>
</body>
</html>

2. D:\>loadpsp -replace -user hr/hr E:\OracleBestPractices\OraclePLSQL\simple.psp
"E:\OracleBestPractices\OraclePLSQL\simple.psp": procedure "show_employees" crea
ted.

3.Browser users can execute the show_employees procedure through a URL.But how? Please guide me .

Thanks in Advance
Prashansh

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points