PL/SQL WEB Toolkit: Using BUTTON to execute PL/SQL procedure

I am trying to execute a PL/SQL procedure with a "SUBMIT" button from a WEB page. I have several URLs that execute perfectly, but I do not want endusers to have to type the URL themselves. I want to display a web page with multiple URLs in a drop_down list. User chooses a member of the list, clicks the "SUBMIT" buttom and that specific URL executes and produces the proper result. I am NOT a web developer, but this is what I've written sofar:
CREATE OR REPLACE PROCEDURE html_list
IS
BEGIN
HTP.PRINT ('<html>');
HTP.PRINT ('<head>');
HTP.PRINT ('<meta http-equiv="Content-Type" content="text/html">');
HTP.PRINT ('<title>Title of the HTML File</title>');
HTP.PRINT ('</head>');
HTP.PRINT ('<body TEXT="#000000" BGCOLOR="#FFFFFF">');
HTP.PRINT ('<h1>List of Valid URLs</h1>');
HTP.PRINT ('<p>Choose your desired URL from the list below.');
HTP.PRINT ('<FORM method="post" action="WHATEVER_COUNTS_WEB">');
HTP.PRINT ('<FORM method="post" action="REQUEST_OBJECTS?PARAM1=MY_SCHEMA_ID">');
HTP.PRINT ( '<SELECT name="URL">
<option value="http://asai01.ffxlab.net:8080/me_epg_dad/WHATEVER_COUNTS_WEB">Count of Rows in Whatever Tables
<option value="http://asai01.ffxlab.net:8080/me_epg_dad/REQUEST_OBJECTS?PARAM1=ME">Request Objects for MY_SCHEMA_ID
<input type="submit" value="Submit"/>
</SELECT>');
HTP.PRINT ('</FORM>');
HTP.PRINT ('</body>');
HTP.PRINT ('</html>');
END;
Any help would be greatly appreciated. I've been writing PL/SQL code since 1989, but have never had to execute code via a WEB page until this week.
Thanks so much

Hi,
Welcome to Oracle Forums!
Please acquaint yourself with the FAQ and forum etiquette if you haven't already done so.
Always post code snippets enclosed in a pair of &#123;code&#125; tags as explained in FAQ
This Forum is dedicated to Oracle Forms. Unfortunately there is no Forum for WebToolKit that I know of. The closest is Oracle Application Express (APEX).
If you objective is to have the User Navigate to the URL clicked then the easiest way is to use anchor tag with href attribute
CREATE OR REPLACE PROCEDURE html_list
IS
BEGIN
HTP.PRINT ('<html>');
HTP.PRINT ('<head>');
HTP.PRINT ('<meta http-equiv="Content-Type" content="text/html">');
HTP.PRINT ('<title>Title of the HTML File</title>');
HTP.PRINT ('</head>');
HTP.PRINT ('<body TEXT="#000000" BGCOLOR="#FFFFFF">');
HTP.PRINT ('<h1>List of Valid URLs</h1>');
HTP.PRINT ('<p>Choose your desired URL from the list below.</p>');
HTP.PRINT ('<a href="http://asai01.ffxlab.net:8080/me_epg_dad/WHATEVER_COUNTS_WEB" target="_blank">Count of Rows in Whatever Tables</a>');
HTP.PRINT('<a "http://asai01.ffxlab.net:8080/me_epg_dad/REQUEST_OBJECTS?PARAM1=ME" target="_blank">Request Objects for MY_SCHEMA_ID</a>');
HTP.PRINT ('<FORM method="post" action="WHATEVER_COUNTS_WEB">');
HTP.PRINT ('<FORM method="post" action="REQUEST_OBJECTS?PARAM1=MY_SCHEMA_ID">');
HTP.PRINT ( '<SELECT name="URL">
<option value="http://asai01.ffxlab.net:8080/me_epg_dad/WHATEVER_COUNTS_WEB">Count of Rows in Whatever Tables
<option value="http://asai01.ffxlab.net:8080/me_epg_dad/REQUEST_OBJECTS?PARAM1=ME">Request Objects for MY_SCHEMA_ID
<input type="submit" value="Submit"/>
</SELECT>');
HTP.PRINT ('</FORM>'); */
HTP.PRINT ('</body>');
HTP.PRINT ('</html>');
END;Change the target attribute to suite your needs. More here http://www.w3schools.com/tags/att_a_target.asp
Or, maybe explore Apex !
Cheers,

Similar Messages

  • Oracle Multimedia PL/SQL Web Toolkit Sample Application

    Hi,
    I am trying Oracle Multimedia PL/SQL Web Toolkit Sample Application for Oracle database 11g Release 2, on the client components of the readme file, it says that oracle http server must be installed, and http server is available on the companion CD of Oracle Database 10g Release 2 (10.2), actually I'm using Oracle database 11g, is it because of database version that I cannot find http server component to add using universal installer or because during installation I chose install on my laptop and not a server?
    regards,
    Hassane Cabir

    In apex folder (the downloaded one), there is README.txt under owa which contains information about PL/SQL Web Toolkit and how to upgrade.
    This is the content of this file:
    PL/SQL Web Toolkit 10.1.2.0.6
    Application Express 3.0 requires PL/SQL Web Toolkit version 10.1.2.0.6 or greater.
    As a convenience, the PL/SQL Web Toolkit 10.1.2.0.6 is included with Application Express 3.0
    in the apex/owa directory. This version of the PL/SQL Web Toolkit is not a replacement for
    subsequent versions of the PL/SQL Web Toolkit, as delivered with database patch sets or
    Critical Patch Updates.
    If the PL/SQL Web Toolkit version is lower than version 10.1.2.0.6, the included PL/SQL Web
    Toolkit bundled with Application Express 3.0 should be installed prior to the installation of
    Application Express 3.0.
    To determine the PL/SQL Web Toolkit version, connect to the database as the SYS user and
    run the query:
    select owa_util.get_version from dual;
    Installing the PL/SQL Web Toolkit 10.1.2.0.6
    1) Stop all applications using the database
    2) Navigate to the directory apex/owa
    3) Connect via SQL*Plus as the database user SYS
    4) Run the PL/SQL Web Toolkit installation script by issuing: @owainst.sql
    5) Review the output displayed from owainst.sql and ensure no errors were encountered.
    6) Confirm the PL/SQL Web Toolkit version is 10.1.2.0.6 or greater by connecting to the database
    as the SYS user and running the query:
    select owa_util.get_version from dual;
    7) Run the utlrp.sql script from the Oracle Database home to recompile all invalid PL/SQL
    packages now instead of when the packages are accessed for the first time. This step is
    optional but recommended. To run utlrp.sql, issue: @?/rdbms/admin/utlrp.sql
    Saad

  • How to print a page written in pl/sql web toolkit

    Dear members,
    I have a time sheet page created using pl/sql web toolkit. I want to submit this page to the printer.
    Please let me know, if there are any examples or documents on this one.
    Thanks
    Murugan

    I try to show/hide a div depending on the occurence of errors. I resolved this problem by doing this in javascript.
    function showEdu(){
    $("#edu").animate({ height: 'show', opacity: 'show' }, 'slow');
    $s('P6_EDU_SHOWN','Y');
    function hideEdu(){
    $("#edu").animate({ height: 'hide', opacity: 'hide' }, 'slow');
    $s('P6_EDU_SHOWN','N');
    function checkEduError(){
    if($("span").hasClass("errTxt") == true)
    {showEdu();}
    else
    if($v('P6_EDU_SHOWN') == 'Y')
    {showEdu();}
    else
    {hideEdu();}
    }

  • Migrate/Import/[etc.] PL/SQL Web-Toolkit Application to APEX

    Hello all,
    I've only recently learned about APEX and have dabbled with it for a little while, and I'm quite impressed with how amazingly quick it is to develop applications with it.
    A few co-workers and myself are trying to convince "The Management" that we should pursue using APEX to develop our Enterprise Applications. Currently we write our web apps using the PL/SQL WebToolkit, accessing our applications at URL's like: http://host/dad/[package.]procedure .
    Recently (within the past month) there was a convention in the Southern California region where I believe some people from TUSC presented on APEX. As I understand it, they said it was possible to migrate existing applications (written in packages and procedures) to APEX. I'm also told that it is possible to view the PL/SQL that is rendered by APEX to display the application.
    We've practically sold our Director, however he has a few outstanding issues he's asked me to research, as he feels his boss would be most concerned with:
    * How much effort will it take to migrate/import/etc the PL/SQL WebToolkit Application to APEX
    * Should the need arise, how much effort would it take to move from APEX back to PL/SQL WebToolkit
    I've tried researching these topics over the past few days and I haven't really come up with much. I realize that you can call PL/SQL packages/procedures/etc from within a region, but as I read on a thread in these forums ( How to jump from mod_plsql to APEX! ), you still won't be able to take advantage of the Items, Computations, Processes, etc. Is there, in fact, a way of importing a PL/SQL-developed Web Application into APEX to take advantage of all its tools? I would imagine it would be quite a feat to be able to create the items for the form fields, maintain the layout and such, but I need to provide my Director with as much information on these topics as possible.
    Many of us developers are really excited at the prospect of developing with this tool; it would be a shame to lose the opportunity over not being able to provide any information on the topics above.
    Thanks in advance for your assistance,
    -Luis

    Hi Luis,
    I had a client a couple of years back who had an existing PL/SQL Web Toolkit application who used the htp.p etc calls to generate the HTML (and in some cases CSS) for their site. They were interested in using Application Express and asked me to design a new administration module for their site (which I did). The development went extremely smoothly so they then asked about re-writing their existing site in APEX (since maintaining the old site was not a straight-forward task).
    Fortunately for me, the original designer had the foresight to put lots of the application logic into packages (which I could reuse), but I quickly (about 2 or 3 days from memory) created a custom theme and templates in APEX which gave the same look and feel as the existing site.
    Personally, I think if you tried to re-use the existing htp.p calls (by using PL/SQL regions etc), then you would be missing out on some of the major advantages of using APEX (such as the ability to easily change the look and feel of your application).
    I always think that migrating to a new tool/platform etc is a great opportunity to re-examine your existing code to perhaps see if you can do things differently (speed up those queries, perhaps make the navigation more logical etc).
    So, yes you can certainly re-use lots of your existing packaged logic, but I would also take the leap and use the features that Application Express provides to make future maintenance of your application easier.
    Just my thoughts.
    John.

  • SP2-0310 trying to upgrade PL/SQL Web Toolkit on 10g XE

    Hi,
    I upgraded my local Oracle 10g XE APEX installation to version 4.0.2.00.06 but then I realized that I probably also needed a newer version of the PL/SQL Web Toolkit.
    So I changed my path to the owa folder and then I executed owainst.sql connected with SYS as SYSDBA.
    This is the output:
    SQL> @owainst.sql
    PL/SQL procedure successfully completed.
    PL/SQL procedure successfully completed.
    PL/SQL procedure successfully completed.
    OWA_DBG_MSG
    Installed OWA version is: 10.1.2.0.4;
    Shipped OWA version is  : 10.1.2.0.6;
    OWA packages v10.1.2.0.6 will be installed into your database v102010
    Will install owadummy.sql and owacomm.sql
    Session altered.
    SP2-0310: unable to open file "&wpi_file_var.sql"
    SP2-0310: unable to open file "&owa_file_var.sql"
    Session altered.Why doesn't this work? This is really driving me crazy! Is there something wrong with the version of owa shipped with the 4.0.2 patch?
    Thanks,
    Matthias

    Found the solution to my problem...
    I had "set define off" in my glogin.sql file :-) So the script couldn't replace the & variables...
    Matthias

  • Pass Pl/sql table into USING clause in EXECUTE IMMEDIATE statment

    Getting error when I try to pass the PL/SQL table into USING clause in EXECUTE IMMEDIATE statment:
    Declare
    result NUMBER;
    TYPE values_tab IS TABLE OF NUMBER INDEX BY BINARY_INTEGER;
    lv_tab values_tab;
    lv_exp varchar2(300);
    lv_exec varchar2(300);
    BEGIN
    lv_tab(1) := 5;
    lv_tab(2) := 48;
    lv_tab(3) := 7;
    lv_tab(4) := 6;
    lv_exp := ':b1+:b2+(:b3*:b4)';
    lv_exec := 'SELECT '||lv_exp ||' FROM DUAL';
    EXECUTE IMMEDIATE
    lv_exec
    INTO
    result
    USING
    lv_tab;
    DBMS_OUTPUT.PUT_LINE(result);
    END;
    Error at line 1
    ORA-06550: line 20, column 12:
    PLS-00457: expressions have to be of SQL types
    ORA-06550: line 15, column 8:
    PL/SQL: Statement ignored
    I am trying to evaluate the expression ":b1+:b2+(:b3*:b4)" which is stored in table. This table has different expressions (around 300 expressions). I want to use the bind variables in expression because each expression evaluated thousand of time may be more in some case. If I don't use bind variable then it fill shared pool.
    Is there any way I can pass the USING (IN) parameters dynamically instead of writing "USING lv_tab(1), lv_tab(2), lv_tab(3), lv_tab(4)"? As number of input parameters change depend on the expression in the table.
    If not possible please suggest any other ideas/approches
    Please help..
    Edited by: satnam on Jun 11, 2009 11:50 AM

    Well, you keep changing reqs faster I can keep up. Anyway, assuming N-th bind variable (left-to-right) corresponds to collection N-th element:
    Declare
        result NUMBER;
        lv_tab values_tab := values_tab();
        lv_exp varchar2(300);
        lv_exec varchar2(300);
        lv_i number := 0;
    BEGIN
        lv_tab.extend(4);
        lv_tab(1) := 5;
        lv_tab(2) := 48;
        lv_tab(3) := 7;
        lv_tab(4) := 6;
        lv_exp := ':5000135+:5403456+(:5900111*:5200456)';
        lv_exec := lv_exp;
        While regexp_like(lv_exec,':\d+') loop
          lv_i := lv_i + 1;
          lv_exec := REGEXP_REPLACE(lv_exec,':\d+',':b(' || lv_i || ')',1,1);
        end loop;
        lv_exec := 'BEGIN :a := ' || lv_exec || '; END;';
    DBMS_OUTPUT.PUT_LINE(lv_exec);
    EXECUTE IMMEDIATE lv_exec USING OUT result,IN lv_tab;
    DBMS_OUTPUT.PUT_LINE(result);
    END;
    BEGIN :a := :b(1)+:b(2)+(:b(3)*:b(4)); END;
    95
    PL/SQL procedure successfully completed.
    SQL> SY.

  • APEX 3.0 requires PL/SQL Web Toolkit version 10.1.2.0.6 or greater

    Hi All,
    We have just upgraded our APEX 2.2.1 env (running in a 9.2.0.8 database) to APEX 3.1.1 and after that upgrade we realized about the requirement to have web toolkit version 10.1.2.0.6 installed prior to the installation of APEX 3.0.
    Based in this scenario, I have some questions:
    1. Can we install PL/SQL Web Toolkit version 10.1.2.0.6 on a 9.2.0.8 database? Our current PL/SQL Web Toolkit version is 9.0.4.0.6
    2. If so, can we do it now? after APEX 3.1.1 was installed?
    3. What are the problems we could have if we don't install web toolkit v. 10.1.2.0.6?
    Thanks in advance,
    Harvey

    Hi Harvey,
    1.) Yes you can
    2.) Yes you can install it after you have installed APEX 3.1.1 -> because it's independent of the APEX installation, it's just a pre-requirement for APEX to run.
    3.) I think I read one time in the forum that it's required for the region caching feature of APEX. But independent of that, if it's a documented pre-requirement I wouldn't wait until I hit a bug which would required 10.1.2.0.6
    Just my 2 cents
    Patrick

  • PL/SQL Web Toolkit version 10.1.2.0.6, where to download?

    Hi:
    It's written in the documentation that we should have PL/SQL Web Toolkit version 10.1.2.0.6 or later... but I didn't find from where I can download.
    I'm sorry if it's not the appropriate forum.
    Saad

    Hello Saad,
    >> So can I download this alone from version 3.1 ?
    I’m not sure what you mean by “download this alone”. If you downloaded the 3.1 full installation file, you don’t need to download anything else. Just unzip the file, and under ‘apex\owa’ directory, you’ll find the proper files to install PL/SQL Web Toolkit version 10.1.2.0.6. Just read the readme file in the directory.
    Regards,
    Arie.

  • How to access PL/SQL Web Services using java

    New to Webservices. Created PL/SQL Web Service using JDeveloper. Vendor is not sure how to access it using java. Can anyone please help to point in the right direction or provide some sample ?

    So if I'm correct you have already exposed a PL/SQL procedure or function as web service?
    In that case you can generate a proxy (client) for the generated web service using JDeveloper. It will generate Java code which invokes the web service.
    See the wizard in JDeveloper, it should be in the same category as the create PL/SQL web service wizard.
    Regards, Ronald

  • Pl/Sql Web Toolkit vs. Apex

    What are the main differences between Apex and Pl/Sql web pages?
    Is Pl/Sql Web Toolkit better for bigger and more complex applications since you do everything from scratch? ?. Since Apex is build in Pl/sql i think it's just a shorcut(a faster way) to build web applications.
    Please corect me if i'm wrong.
    All my regards,
    Popovich Jhyr

    You are serious asking this in the APEX support forum?? APEX allows you to develop the application in a RAD fashion, where as doing stuff with the pl/sql toolkit is all done by hand.. Plus APEX handles the session handling for you...
    'nuff said.. If you want to do things by hand, glad I am NOT paying your salary...
    Thank you,
    Tony Miller
    Webster, TX
    I cried because I did not have an office with a door until I met a man who had no cubicle.
    -Dilbert

  • Using PreparedStatement to execute a SQL Query

    hi All,
    I am trying to use PreparedStatement to execute a Query in Java.
    The Problem is that where Clause of that Query is dynamically formed as per
    user inputs .
    So , in this case will it help if I use PreparedStatement in place of Normal Statement ?
    If Yes , then how to handle the Dynamic where clause of the Query ?
    Thanks in Advance.
    Regards,
    ninad

    Let's say the user is providing a name, and you'r querying based on that name: PrepartedStatement ps = con.prepareStatement("select * from my_table where name = ?);
    ps.setString(1, nameFromUser);
    ResultSet rs = ps.executeQuery();
    http://java.sun.com/developer/onlineTraining/Database/JDBC20Intro/

  • Can window and aggregate SQL functions be used in Pro*C embedded SQL?

    It appears that window functions such as dense_rank() over(partition by ... order by ...) can not be used in Pro*C embedded SQL? Can somebody confirm that that is really the case?
    Thanks
    Rawender Guron

    Please refer to this thread: "Is this forum also used for Pro*'C Questions? "
    Is this forum also used for Pro*'C Questions?

  • Include Button that executes PL/SQL procedure to SQL query based region

    I would like to add two columns to a SQL query region.
    These columns would not be sourced from the query, but rather would be used to execute a PL/SQL procedure.
    For example, I would like to have a manager approve or deny adding an additional employee to the department.
    There would be one button for APPROVE. And, one button for DENY.
    The PL/SQL procedure would execute to perform the required DML based upon the selected action (either APPROVE or DENY).
    A sample output would look like this:
    <APPROVE>, <DENY>, John Doe, Accountant
    <APPROVE>, <DENY>, Jane Doe, Accountant
    Is there any way to add a button to a SQL Query based report region where that button executes a stored proc? If so, what is the basic process for doing this?
    Thanks!
    -Reid

    Is there any way to add a button to a SQL Query based report region where that button executes a stored proc? If so, what is the basic process for doing this?Conditional page item? You can associate processes with buttons on a page

  • PL/SQL: how to use in parameter in select sql where clause

    Hi
    in a procedure, I need to apply 'in parameter' in 'where clause' along with other table fields. Purpose is to create dynamic select querry with multiple conditions.
    select count(*) from table xx
    where y_code=2008 and v_type in ('SI', 'TI', 'DI') ;
    my requirement is replace 'and v_type in ('SI', 'TI', 'DI')' with in parameter. pls note in paramter may contain null value.
    Regards

    ... e.g. why on earth do you want to pass in a string to be appended to the WHERE clause of an SQL.I second that and I strongly advice NOT to do it. If you really want to do it, then come back and show us, how you would prevent SQL injection. This approach is too dangerous (and too complex) IMHO.
    Do it straight forward as in the article of Tom Kyte (link in the post of BluShadow above)

  • Using OracleCommand to execute a Stored Procedure

    I have a problem calling a stored procedure that results in the error: ORA-00936: missing expression. This is in an application running as a service.
    I have searched through Google and I have not found a solution.
    I have a variable that instantiates a new OracleCommand called sqlCmd.
    Then, I set properties on it:
    sqlCmd.CommandText = "sp_myProc"
    sqlCmd.CommandType = CommandType.StoredProcedure
    sqlCmd.Connection = DBConnection 'OracleConnection object
    Next, I add the parameters:
    sqlCmd.Parameters.Add("RETURN_VALUE", OracleDbType.Int32)
    sqlCmd.Parameters("RETURN_VALUE").Direction = ParameterDirection.ReturnValue
    sqlCmd.Parameters.Add("TypeId", OracleDbType.Byte).Value = TranslateTypes(Type)
    sqlCmd.Parameters.Add("Status", OracleDbType.Byte).Value = Status
    sqlCmd.Parameters.Add("Name", OracleDbType.Varchar2).Value = Name
    Finally, I set the connection string and open the connection and execute the statement:
    retVal = sqlCmd.ExecuteNonQuery()
    This results in the ORA-00936: missing expression error.
    What am I doing incorrectly?

    Did you set BindByName = true on the command object? I really don't understand why this isn't the default.
    Eric

Maybe you are looking for

  • Making a form work

    I am building a form to take a market survey for energy and home improvement needs in my market area, how do I get it where when they hit submit that the form gets emailed to me? And is there anyway to integrate a form to send email and text message?

  • Possible to split Audio/ Visual for apple tv

    Hey, I have a projector in my room and was wondering if i could airplay movies through itunes to the apple tv (connected to my projector) and then keep the sound coming out through the headphone port (the speakers on the projector are average). As i

  • How to recover ZFS pool after re-installation of Solaris10

    I have two disks(c1t0d0-disk1, c1t1d0-disk2) and I installed Solaris 10(fresh installation) in a slice of disk1. On the other hand, I have ZFS filesystem in a slice of disk2. I would like to restore old ZFS filesystem in disk2. How do I recover old Z

  • Parameters in a subtemplate

    Hi All, I am calling a sub template from two places in the main template. I pass a parameter called 'section' to the sub template. The section parameter would have values like 'sec1', 'sec2' etc(Please find the xml from the data template below). RTF

  • Radix sort help needed

    Can someone please help me with this radix sort on a dictionary (linkedList from the java utils). I am trying to pass the linkedList into an array which the java apis say that you can do with the to.Array() method but I am getting the noninformative