+ All Categories
Home > Documents > PLSQL Server Pages

PLSQL Server Pages

Date post: 03-Jun-2018
Category:
Upload: meeeeeeeee12222
View: 229 times
Download: 0 times
Share this document with a friend

of 26

Transcript
  • 8/12/2019 PLSQL Server Pages

    1/26

    DB application development using

    PL/SQL Server Pages(PSP)

  • 8/12/2019 PLSQL Server Pages

    2/26

    PL/SQL Server Pages (PSP)

    Author web pages using script-friendly HTML

    authoring tools.

    Drop in PL/SQL code within HTML code using

    scripting tag .

    In short:

    PSP: embedded PL/SQL within HTML

  • 8/12/2019 PLSQL Server Pages

    3/26

    Syntax of PL/SQL Server Pages

    Same script tag syntax as in ASP and JSP:

  • 8/12/2019 PLSQL Server Pages

    4/26

    Syntax of PL/SQL Server Pages

    PSP Element Name Specifies . . .

    Page Directive Characteristics of thePL/SQL server page.

    Procedure Directive The name of the stored

    procedure produced by the

    PSP file.

    Declaration Block The declaration for a set of

    PL/SQL variables that are

    visible throughout the page,

    not just within the

    next BEGIN/END block.

    Code Block A set of PL/SQL statements

    to be executed when theprocedure is run.

    Expression Block A single PL/SQL expression,

    such as a string, arithmetic

    expression, function call, or

    combination of these.

  • 8/12/2019 PLSQL Server Pages

    5/26

    Oracle Client R2

    http://www.oracle.com/technetwork/database/enterprise-

    edition/downloads/112010-win64soft-094461.html

    http://www.oracle.com/technetwork/database/enterprise-edition/downloads/112010-win64soft-094461.htmlhttp://www.oracle.com/technetwork/database/enterprise-edition/downloads/112010-win64soft-094461.htmlhttp://www.oracle.com/technetwork/database/enterprise-edition/downloads/112010-win64soft-094461.htmlhttp://www.oracle.com/technetwork/database/enterprise-edition/downloads/112010-win64soft-094461.htmlhttp://www.oracle.com/technetwork/database/enterprise-edition/downloads/112010-win64soft-094461.htmlhttp://www.oracle.com/technetwork/database/enterprise-edition/downloads/112010-win64soft-094461.htmlhttp://www.oracle.com/technetwork/database/enterprise-edition/downloads/112010-win64soft-094461.htmlhttp://www.oracle.com/technetwork/database/enterprise-edition/downloads/112010-win64soft-094461.htmlhttp://www.oracle.com/technetwork/database/enterprise-edition/downloads/112010-win64soft-094461.htmlhttp://www.oracle.com/technetwork/database/enterprise-edition/downloads/112010-win64soft-094461.htmlhttp://www.oracle.com/technetwork/database/enterprise-edition/downloads/112010-win64soft-094461.htmlhttp://www.oracle.com/technetwork/database/enterprise-edition/downloads/112010-win64soft-094461.html
  • 8/12/2019 PLSQL Server Pages

    6/26

    Steps in building PL-SQL server pages Download the Oracle Client 11g Release2 from

    http://www.oracle.com/technetwork/database/enterprise-edition/downloads/112010-win32soft-098987.html

    install the above software, the installation is straightforward

    Double click onload PSP to

    activate

    http://www.oracle.com/technetwork/database/enterprise-edition/downloads/112010-win32soft-098987.htmlhttp://www.oracle.com/technetwork/database/enterprise-edition/downloads/112010-win32soft-098987.htmlhttp://www.oracle.com/technetwork/database/enterprise-edition/downloads/112010-win32soft-098987.htmlhttp://www.oracle.com/technetwork/database/enterprise-edition/downloads/112010-win32soft-098987.htmlhttp://www.oracle.com/technetwork/database/enterprise-edition/downloads/112010-win32soft-098987.htmlhttp://www.oracle.com/technetwork/database/enterprise-edition/downloads/112010-win32soft-098987.htmlhttp://www.oracle.com/technetwork/database/enterprise-edition/downloads/112010-win32soft-098987.htmlhttp://www.oracle.com/technetwork/database/enterprise-edition/downloads/112010-win32soft-098987.htmlhttp://www.oracle.com/technetwork/database/enterprise-edition/downloads/112010-win32soft-098987.html
  • 8/12/2019 PLSQL Server Pages

    7/26

    Steps in building PL-SQL server pages

  • 8/12/2019 PLSQL Server Pages

    8/26

    Steps in building PL-SQL server pages

  • 8/12/2019 PLSQL Server Pages

    9/26

    Steps in building PL-SQL server pages

  • 8/12/2019 PLSQL Server Pages

    10/26

    Steps in building PL-SQL server pages

  • 8/12/2019 PLSQL Server Pages

    11/26

    Steps in building PL-SQL server pages

  • 8/12/2019 PLSQL Server Pages

    12/26

    Steps in building PL-SQL server pages

  • 8/12/2019 PLSQL Server Pages

    13/26

    Steps in building PL-SQL server pages

  • 8/12/2019 PLSQL Server Pages

    14/26

    Steps in building PL-SQL server pages

  • 8/12/2019 PLSQL Server Pages

    15/26

    Steps in building PL-SQL server pages

  • 8/12/2019 PLSQL Server Pages

    16/26

    Steps in building PL-SQL server pages

  • 8/12/2019 PLSQL Server Pages

    17/26

    TNSNAMES.ORA

  • 8/12/2019 PLSQL Server Pages

    18/26

    Steps in building PL-SQL server pages

    HTML/PL-SQL code (Notepad++), the file extension.psp

    Save your code in command prompt current folder

    load PSP to your database( we will talk about thislater )

    Check if the procedure is created( check this in SQL

    developer), otherwise correct errors

    Run your PS page using internet browser( we will

    learn this)

    Dont forget to use VPN for off campus access

  • 8/12/2019 PLSQL Server Pages

    19/26

    PSP_example

    PL/SQL Server Page

    Mountain Climb


    Club is good for mountain climbing.

    Procedure Name

    Variables_declartions

    html

    PL SQL

    Comments

  • 8/12/2019 PLSQL Server Pages

    20/26

    How to Load PL-SQL

    load chapter5_test

    loadpsp -replace -user IS420_AS97172@ORACLE chapter5_test.psp

  • 8/12/2019 PLSQL Server Pages

    21/26

    Procedure created

    create or replace

  • 8/12/2019 PLSQL Server Pages

    22/26

    create or replace

    PROCEDURE chapter5_test AS

    club_name sporting_clubs.name%type;

    club_state sporting_clubs.state%type;

    BEGIN NULL;

    htp.prn('

    ');

    PL/SQL Server Page

    Mountain Climb


    ');

    select name,state into club_name,club_state from sporting_clubs

    where club_id = 120;

    htp.prn('

    Club ');

    htp.prn( club_name);

    htp.prn(' is good for mountain

    climbing.

    ');

    END;

    Chapter5_test

    loaded procedure

  • 8/12/2019 PLSQL Server Pages

    23/26

    Running chapter5_test using browser

    http://oracle.is.umbc.edu:8080/classpsp/IS420_AS97172.chapter5_test

    http://oracle.is.umbc.edu:8080/classpsp/IS420_AS97172.chapter5_testhttp://oracle.is.umbc.edu:8080/classpsp/IS420_AS97172.chapter5_test
  • 8/12/2019 PLSQL Server Pages

    24/26

    Tenant_List example

    loadpsp -replace -user

    IS420_AS97172@ORACLE tenant_list.PSP

    http://localhost/var/www/apps/conversion/tmp/scratch_4/tenant_list.psphttp://localhost/var/www/apps/conversion/tmp/scratch_4/tenant_list.psp
  • 8/12/2019 PLSQL Server Pages

    25/26

    Tenant_List example

    http://oracle.is.umbc.edu:8080/classpsp/IS420_AS97172.tenant_list

    T l DB

    http://localhost/var/www/apps/conversion/tmp/scratch_4/tenant_list.psphttp://oracle.is.umbc.edu:8080/classpsp/IS420_AS97172.tenant_listhttp://oracle.is.umbc.edu:8080/classpsp/IS420_AS97172.tenant_listhttp://localhost/var/www/apps/conversion/tmp/scratch_4/tenant_list.psp
  • 8/12/2019 PLSQL Server Pages

    26/26

    Travel DB


Recommended