<%@ page language="PL/SQL" %> <%@ page errorPage="Hrs_Error_Page.psp" %> <%@ plsql procedure="hotel_res_mid" %> <%@ plsql parameter="p_hotel_id" type="NUMBER" default="NULL" %> <%! /** Overview : This PSP is part of the HRS Application sample. The PSP generates an HTML page that displays the Hotel Name and buttons for Reservation/Cancellation. In case of Exception, the error_page is displayed. Parameters : p_hotel_id - Parameter to pass the Hotel id p_req_type - Parameter to pass the request type Modification History: Person Date Comments ------------------------------------------------------------- Pushkala 09-AUG-2000 Initial Sample **/ /* Variable to store the Hotel Name */ l_hotel_name hotels.name%TYPE; /* Cursor to select the Hotel Name */ CURSOR c_hotels(cp_hotel_id hotels.id%TYPE) IS SELECT name FROM hotels WHERE id = cp_hotel_id; %> PSP Sample - Reservation/Cancellation


<% /* Display the Hotel Name with heading and buttons to allow Reservation/Cancellation */ /* Get the Name of the Hotel selected */ OPEN c_hotels(p_hotel_id); FETCH c_hotels INTO l_hotel_name; IF c_hotels%NOTFOUND THEN l_hotel_name := ' '; END IF; CLOSE c_hotels; %>

You have selected Hotel : <% /* Display the Hotel Name stored in the local variable */ %> <%= l_hotel_name %>



name=P_HOTEL_ID>