Home » Developer & Programmer » Application Express, ORDS & MOD_PLSQL » psp related question (Oracle 9i)
psp related question [message #415593] Tue, 28 July 2009 05:50
mm_kanish05
Messages: 487
Registered: January 2007
Location: Chennai
Senior Member

I got some the sample psp program.

dept_insert_req.psp
-----

<%@ page language="PL/SQL" %>
<%@ plsql procedure="dept_insert_req" %>
<html>
  <head>
    <title>Insert DEPT</title>
  </head>
  <body>
    <h1>Insert DEPT</h1>
    <form name="insert" action="dept_insert_act" method="post">
    <table border="1" cellspaceing="3">
      <tr>
        <td>DEPTNO</td>
        <td><input type="text" name="p_deptno" size="2"></td>
      </tr>
      <tr>
        <td>DNAME</td>
        <td><input type="text" name="p_dname" size="14"></td>
      </tr>
      <tr>
        <td>LOC</td>
        <td><input type="text" name="p_loc" size="13"></td>
      </tr>
      <tr>
        <td colspan="2" align="center">
          <input type="submit" name="p_submit" value="Submit">
        </td>
      </tr>
    </table>
    </form>
  </body>
</html>


dept_insert_act
----

<%@ page language="PL/SQL" %>
<%@ plsql procedure="dept_insert_act" %>
<%@ plsql parameter="p_deptno" type="NUMBER"   default="NULL" %>
<%@ plsql parameter="p_dname"  type="VARCHAR2" default="NULL" %>
<%@ plsql parameter="p_loc"    type="VARCHAR2" default="NULL" %>
<%@ plsql parameter="p_submit" type="VARCHAR2" default="NULL" %>
<html>
  <head>
    <title>Insert DEPT</title>
  </head>
  <body>
    <h1>Insert DEPT</h1>
    
    <%
      BEGIN
        INSERT INTO dept (deptno, dname, loc)
        VALUES (p_deptno, p_dname, p_loc);
        COMMIT;
        HTP.Print('    Insert DEPT Completed Successfully!<br><br>');
      EXCEPTION
        WHEN OTHERS THEN
          HTP.Print('    Error: ' || SQLERRM || '<br><br>');
      END;
    %>
    
    <table border="1" cellspaceing="3">
    <% Owa_Util.CellsPrint('SELECT * FROM dept'); %>
    </table>
  </body>
</html>


i have two programs in psp which compiles using loadpsp utility.

i got output both "created" .

When i run the

http://ipaddress:7777/iso/dept_insert_req.psp

i got 1st screen

when i gave input and submit the page. it invokes second program

and output like below

./fa/6620/0/

and when i see the view source in browser i got the same program (dept_insert_act.psp). I feel it should convert as html format


but i got same.

why and what happend

kanish

[EDITED by LF: specified product version after topics have being merged]
  • Attachment: sample.PNG
    (Size: 24.25KB, Downloaded 910 times)

[Updated on: Wed, 29 July 2009 00:45] by Moderator

Report message to a moderator

Previous Topic: equivalent to key-next-item
Next Topic: Cookie is diplay in html?
Goto Forum:
  


Current Time: Fri Dec 02 12:05:03 CST 2016

Total time taken to generate the page: 0.09179 seconds