How a BUTTON can execute some PL/SQL code?

Hello

I m new on APEX and I would like to know how can I do a button APEX run an anonymous code from PL/SQL to a page of the region.

Best regards

Sergio

Just create a button named, submit.

Then, create a process Page
Category PL/SQL
Enter a name for your Page process
Sequence Determines when the process starts
Point Present on - after calculations and Vailidations
Type Anonymous PL/SQL block
Enter the process of PL/SQL Page Paste here your PL/SQL code
Success message Enter a message to display if necessary
When you press the button Click the button that you created
Create processes

Jeff

Tags: Database

Similar Questions

  • How a button can work between 2 indesign files

    I am creating a catalog of products and each section has been created in an indesign file, separated with a separate content page that includes the buttons to link to each of the indesign files. When these are added as items to the folio of the function of the buttons do not work. There are buttons in each indesign file that works when then action is to go to another page in the same file, but try the GET them to post a link to other files turns out to be problematic. Does anyone know how this can be achieved.

    Thank you very much

    For the record, two additional notes about the navto: link...

    • To access a particular page, use navto:ArticleName #1
    • The number following the ' # ' indicates the page number. HOWEVER, the page numbering starts at zero. for example to link to page 3 of an article, you would use #2
  • DW CC 20141 how so he can ignore a line of code not valid

    Is there a way to stop Dreamweaver to score a snippet as being invalid?

    I have a snippet of code that I use to trigger a name to appear in my emails when I use it with my email service.

    I wish that Dreamweaver to stop marking it as invalid.

    I thought that there is an easy way to do it, but I can't understand it.

    Any help is greatly appreciated!

    Sound space in this > prevents him from not to trigger the invalid Code.

    Thank you for the help Nancy O. & Rob Hecker2 (the @ mentions do not work for your names for a reason any...)

    Well there no solution... disappointment.

    So here's a feature request: ability to have the code snippets to be marked as invalid.

  • How to execute a pl/sql conditional

    Hello

    I have the following situation:

    before the user clicks on a button to run a pl/sql code, I need to ask the user on the confirmation. But the confirmation message may appear according to with the return of a pl/sql function. How can I do?

    Thank you

    One solution might be:

    Put the submission as defined by the dynamic action button.

    Create a dynamic action on click of a button

    Define a JavaScript expression parseInt ($v (ITEM)) > 15

    (I expect you'd know how to get the value of the total used in the above expression)

    For real action

    1: confirm action

    2: submit

    Action false

    1 submit

  • How to set multiple parameters in a sql EXECUTE IMMEDIATE

    I want to set nls_language and nls_date_language and set them as different languages. fnd_global.set_nls_context () does not work. So I think I can use the EXECUTE IMMEDIATE and add them together into a single statement. But I don't know how to make that happen. Can someone help me? Thank you very much.

    PS: It must be done in a single call.

    928091 wrote:
    Hey, thanks for your reply, I forgot to mention that it should be in the begin-end block, do you know how?

    EXEC is a more SQL API which can be used to execute the PL/SQL code. What it does is put the PL/SQL code in a BEGIN block... END of block and run.

    So, you can also manually put code in a BEGIN block... END of block and run like that.

    SQL> begin
      2     execute immediate q'[begin execute immediate 'alter session set nls_date_language = ''AMERICAN'''; execute immediate 'alter session set nls_language = ''AMERICAN'''; end;]';
      3  end;
      4  /
    
    PL/SQL procedure successfully completed.
    
    SQL> 
    

    And I don't understand what possible benefit he made a single run in a BEGIN block... Terminate during execution of multiples.

    Why this code is not in your interest, something like this

    begin
         execute immediate 'alter session set nls_date_language = ''AMERICAN''';
         execute immediate 'alter session set nls_language = ''AMERICAN''';
    end;
    /
    
  • How to use a table in a SQL query

    Hello

    I need to use a table of numbers as a VARRAY or table of associated Index so that I can do the following SQL code:

    Select *.
    of *.
    where the array is null or id is in table

    So that if the array is empty it returns all the records, and if the table is not empty, then it will return only the rows associated with the ID of the table.

    Is this possible?

    Kind regards

    Nestor Boscan

    In fact, solution I posted returns all rows when VARRAY is empty, not when it is null. To return all the rows when VARRAY is null, use:

    SQL> select  ename
      2    from  emp
      3    where deptno in (select * from table(cast(sys.OdciNumberList(10,30) as sys.OdciNumberList)))
      4       or sys.OdciNumberList(10,30) is null
      5  /
    
    ENAME
    ----------
    ALLEN
    WARD
    MARTIN
    BLAKE
    CLARK
    KING
    TURNER
    JAMES
    MILLER
    
    9 rows selected.
    
    SQL> select  ename
      2    from  emp
      3    where deptno in (select * from table(cast(null as sys.OdciNumberList)))
      4       or null is null
      5  /
    
    ENAME
    ----------
    SMITH
    ALLEN
    WARD
    JONES
    MARTIN
    BLAKE
    CLARK
    SCOTT
    KING
    TURNER
    ADAMS
    
    ENAME
    ----------
    JAMES
    FORD
    MILLER
    
    14 rows selected.
    
    SQL> 
    

    SY.

  • How to run PL/SQL code, as soon as a page opens

    Hello

    We have a business scenario where we have Apps initialize to obtain data of the ebs. We want this commissioning to arrive as soon as the page opens. Is there a way to do this? Simple, we want to be able to run pl/sql code, as soon as the page opens. Is there a way to do this?

    PL Note: We use APEX with ebs.

    Kind regards
    Joseph

    "You can have the pl/sql code in an Application process that has a ' process ' of ' On Load: before header".

    CITY

  • Wrap the PL/SQL code

    First of all, Hi everyone.

    I need to encrypt my PL/SQL code at run time. I thought using the wrap.exe, but it won't be a good option, once maybe I need to change something in the code and I'll not can send the code wrapped to the final customer. So, I'll use the DBMS_DDL. WRAP, but I have a doubt, I understand that my object will be encrypted in the database, but how can I prevent software this capture SQL (like SQL STATEMENTS TRACE) get the source when creating the object?


    Thank you very much.

    Agree with SomeoneElse, having a license legally correct contract protects your code.

    The package code is not a bad thing if that's what you are providing to the customer and that you have in place adequate source code controls, so you do not lose the source for yourself.  Although there are "unwrappers" out there, it may depend on the version of Oracle as to how well they work, and if they can achieve.  There are tools out there too which can obscure the PL/SQL code by doing things such as the conversion of all the variable names to things without meaning as a0001, a0002, a0003,... and deletes all comments etc before you wrap, so even if someone manages to undo what they are presented with the code that is more difficult to follow.

    Regarding the customer can see SQL running, you won't really be able to do something that, if the customer has access of type DBA to the database; the only thing you can do to avoid this is to provide a managed service where your company has total control of provides a full support for the server, database and applications and the client does not have access to all but the front end of the application.  Of course, if the customer has access to the database and can see running SQL code, then who can actually be beneficial if they have problems, because they can do their own initial analysis to determine the cause and determine if they should send the question to yourselves.

  • The call to the Workflow background process explicit in the pl/sql code

    Hi all

    We have a requirement where we need to call the "Workflow background process" explicitly in the pl/sql code.
    Our wish is that we have an application that runs via a competing program, but before the end of this application we want to put that on the wait and run the 'Workflow background process"explicitly in the code itself (user must not go and run it manually).
    Can someone please advice me how to do this in a PL/SQL code that is called via a concurrent program.

    Kind regards
    Shruti

    PL post Details of the operating system, database and versions EBS.

    One solution is to use the FND_SUBMIT API

    The most common FND API in APPS customizations [ID 221549.1]
    Code example for call Customer Interface RACUST program using the Api FND_SUBMIT 11i and R12 [429278.1 ID]

    https://forums.Oracle.com/forums/search.jspa?threadID=&q=FND_SUBMIT&objid=C3&DateRange=all&userid=&NumResults=15

    HTH
    Srini

  • How can I create a button that will execute some SQL such as UPDATE, DELETE ststements

    Hi all.
    I'm new on ADF.
    I start with this example from oracle
    [http://www.oracle.com/technology/obe/obe11jdev/ps1/ejb/ejb.html]

    My question is how can I make a button that executes sql statements like "set 'name' = last_name employees where employee_id = 111; updated"
    any hint will help you.
    Thank you

    If you are using JPA/EJB then you can write in your session bean method to access the EntityManager and using createNativeQuery to perform the update:
    http://download.Oracle.com/docs/CD/E17477_01/JavaEE/5/API/javax/persistence/EntityManager.html#createNativeQuery (java.lang.String)
    This method will be exposed in your ADF data control and you will be able to drag it to your page.

    If you use ADF BC then you can use the methods of service level AM:
    See 9.7 to 9.9 in the Fusion developer's Guide:
    http://download.Oracle.com/docs/CD/E15523_01/Web.1111/b31974/bcservices.htm#sm0206
    http://download.Oracle.com/docs/CD/E15523_01/Web.1111/b31974/bcadvgen.htm#BABEIFAI

  • How can I get the exit code of a script .bat for Java back to PL/SQL?

    When you call a .bat script, only the exit code 1 returns. How can I get 7 back to the PL/SQL in the code example below?

    C:\Users\pwatson\src\java > type vv.sql

    set echo on

    -call dbms_java.grant_permission ('SYSTEM', 'SYS:java.io.FilePermission', '< < all FILES > >', 'run');

    HOME @EXIT/b ECHO 7 > vv.bat

    TYPE of HOST vv.bat

    CREATE OR REPLACE AND COMPILE THE SOURCES NAMED AS VV JAVA

    import of java.lang.Runtime;

    public class VV

    {

    public static int execute()

    survey java.io.IOException, java.lang.InterruptedException

    {

    int exitCode = 0;

    Duration rt = java.lang.Runtime.getRuntime ();

    Process proc = rt.exec ("cmd.exe /C v.bat 1 > NULL 2 > ZERO");

    proc.waitFor ();

    exitCode = proc.exitValue ();

    return exitCode;

    }

    }

    /

    CREATE OR REPLACE FUNCTION JavaRunShellCommand

    RETURN NUMBER

    IN THE JAVA LANGUAGE

    NAME 'VV.execute () return oracle.sql.NUMBER;

    /

    DISPLAY ERRORS

    NUMBER VARIABLE n;

    CALL JavaRunShellCommand() IN: n;

    PRINT n

    DISPLAY ERRORS

    SELECT JavaRunShellCommand() AS R FROM DUAL;

    DISPLAY ERRORS

    HOST DEL v.bat

    OUTPUT

    It is strange that there are no errors. If the Java code does not work, I would expect an exception. Without an exception in the code handler, I expect to be propagated all the way to the top of the call stack and be displayed by the client. But there is no exception.

    So that means, in my view, that there is nothing wrong with the code Java itself. He made the appeal successfully to run this external process. The fact that the external process falls down, is not an issue/error in Java.

    If this is the case, then the first thing that comes to mind, is that the Oracle (oracle.exe) process that is currently running, runs as a service of the o/s. And that the service will try to run a command through the command shell script. There may be a security or problem access here that prevents the oracle.exe running as a service to do this.

  • How can I get the SQL of a tablespace of the database

    Hi all

    I'm using Oracle 11 g R2. I want to get some tablespaces on my database SQL code. in the same way, I get the DDL of the table using the GET_DDL function.

    How can I get that?

    Kind regards

    Just use 'TABLESPACE' instead of 'TABLE' and a name of a tablespace instead of the name of a table and use dba_tablespaces or the user_tablespaces for a list of tablespaces.
    It's a simple as that!

    ------------
    Sybrand Bakker
    Senior Oracle DBA

  • How to execute the pl/sql block from a file

    Hi all
    can someone tell me how to execute a pl/sql block to a file.it does contain no procedures.it is of the form
    -Start
    -says
    -end;

    Thanx

    Ok.. If the time points? :)

    See you soon!
    Bobin

  • How to make appear a message that can enter some settings such as a variable for the next step?

    Hi all

    How to the dialog box or window pop up a message that can input some parameters as a variable for the next step?

    My sense is if Teststand stage can do that, not using Labview or other language.

    Thank you

    BR

    Johnny

    Take a look at the Options of a stage of pop-up Message tab. The response is returned in Step.Result.Response.

  • How do the quesdtions to see if I can answer some

    How do the quesdtions to see if I can answer some

    Hello

    For the answers - Windows Forums, click this link - you must be in the tab without response.

    Windows - Forums
    http://answers.Microsoft.com/en-us/Windows/Forum?tab=unanswered

    You cannarrow to a specific version of Windows or Windows - see choice just under the tabs.

    I hope this helps.

    Rob Brown - Microsoft MVP<- profile="" -="" windows="" expert="" -="" consumer="" :="" bicycle=""><- mark="" twain="" said="" it="">

Maybe you are looking for