How do we exit from a sub procedure

Hi,
I am calling a sub procedure from my plsql procedure. If an error occurs in the sub-procedure, it should exit from the appilcation.
return gets the control back to the called procedure. but is there a way to stop the execution totally?
Thanks,
Narayan

Raise an exception that is not handled in the sub-procedure nor in the main procedure.

Similar Messages

  • How can I exit from full-screen View?

    On the View menu, I clicked "Full screen View", but then I couldn't find any way back to normal view. I had to Force-Quit Firefox to escape.
    How do you exit from Full Screen View?
    (I tried Esc, Ctrl-C, and many other key combinations)
    Thanks, PeterR

    Try F11.

  • How do I exit from my email account back to the main menu page ?

    How do I exit from my email account back to the main menu page?

    In my previous post die should have been FIVE.
    Some day we might be able to edit posts on our iPad.

  • Exit from Pl/SQL procedure if first cursor failss?

    How to exit from q PL/SQL procedure. I have number of cursors defined in PL/SQL procedures and i want to exit if the first cursor does not return any rows

    open firstCursor;
    Fetch/Bulk Fetch from first cursor;
    IF firstCursor%found then
       "Do all the normal other stuff"
    end if;

  • How to pass parameter from 1 stored procedure to another stored procedure inside crystal report

    Hi
    I have several stored procedure in my Crystal Report. I am wondering if it is possible for me to pass a parameter to one of the stored procedure and to use the result of that stored procedure E.g. CustomerCode. To another 2 stored procedure to generate the report dynamically?
    I have 3 stored procedure
    The 1st one is used to gather information and process the calculation
    another 2 stored procedure is used for generate the graph and both of them required to take 2 parameters. The 1st stored procedure will require 1 parameter (E.G. Reference Code) and will return a set of information including the data that could be use on the other 2 stored procedures.
    After I added these 2 stored procedure, it requires me to pass 3 parameters to the report. I would like to know if I could only pass the Reference Code for stored procedure 1 and use it to retrieve the information for the other 2 parameter?
    Thanks in advance
    Chi

    Hi Chi
    To pass parameter from 1 stored procedure to another stored procedure, you will have to create sub report. In your case you will have to create 2 sub reports for 2nd and 3rd stored procedure and link those sub reports with the main report using Reference Code field in order to pass the values.
    After creating the report when you will refresh the report, it will ask 4 parameters, one parameter for main report, one for the first subreport and two for second subreport to fetch the data correctly.
    Regards
    Poonam Thorat.

  • How to track exit from the PageFragment Lifecycle

    Hi,
    I have a requirement of keeping track of exit from a pageFragment.
    My structure contains: a TaskFlow which contains a train . This train node contains the page Fragments. Now when i navigate from one PageFrag to another ie. when i exit the currently selected node having a page Fragment, i need to fire a logic.
    I tried using creating a bean which implements RegionController interface which has refreshRegion(RegionContext ) method.I got hold of RegionBinding interface which has only one of the following values: Entry, Execute_Model, Prepare_Model, Refresh_Unknown, Render_Model and Type_executable_region.
    Also in this case i am not exiting the TaskFlow during the navigation.
    My doubt is how do i or can i use RegionController to keep track of exit from the currently rendered PageFragment's  Lifecycle.
    Also , can i use PagePhaseListener to keep track of the PageFragment lifecycle stage. (My understanding is PagePhaseListener is to be used for Jspx not Jsff). Plz do correct me if i am wrong.
    Thanks,
    Prasenjit
    Edited by: user586616 on Aug 31, 2009 3:54 AM
    Edited by: user586616 on Aug 31, 2009 3:57 AM

    Hi Frank,
    I have created a ControllerClass which implements RegionController. I have registered the same as controller class in my pageFragments PageDef.
    So, on navigation from one train node to another. due to post back call to leaving node and freshcall to the arriving node in the train flow. i am able to get the leaving as well approaching node.
    My doubt is can i get similar or better control over the nodes traversed using trainModel or anyother adfinternal controller class? Kindly suggest any better way of getting handle to the navigating train nodes.
    Sample Code which i have implemented:
    public class RegionControllerBean implements RegionController {
    public boolean refreshRegion(RegionContext regionContext) {
    System.out.println("**********************************");
    System.out.println("inside refreshRegion method call");
    String selectedView = ControllerContext.getInstance().getCurrentViewPort().getViewId(); ------> this gives me the handle to the viewId of the curently selected pageFragment
    System.out.println(ControllerContext.getInstance().getCurrentViewPort().getViewId().toString());
    String pageName = selectedView.split("/")[2];
    System.out.println("Current PageName:"+pageName);
    System.out.println("name: "+regionContext.getRegionBinding().getName());
    int refreshFlag = regionContext.getRefreshFlag();
    if(refreshFlag == RegionBinding.PREPARE_MODEL){
    System.out.println("Inside prepare Model phase"); ------> on entering of that node i need to call some logic before prepare_model phase
    if(refreshFlag == RegionBinding.EXECUTE_MODEL){
    System.out.println("Inside execute model phase");
    if(refreshFlag == RegionBinding.RENDER_MODEL){
    System.out.println("Inside render model phase");
    // propagate refresh to inner binding container
    regionContext.getRegionBinding().refresh(refreshFlag);
    return false;
    public boolean validateRegion(RegionContext regionContext) {
    // propagate the validate to inner binding container
    System.out.println("inside validate region method");
    regionContext.getRegionBinding().validate();
    return false;
    thanks,
    Prasenjit

  • How to Start report from pl sql procedure

    I need to create a procedure which runs report and email report output to specified email adress.
    I don't know how to start report from pl/sql. Any help will be appreciated.

    I want to start oracle report from plsql procedure. Is there any OS system command I can use or any other method? My database is installed on windows 2000 machine.

  • How get a cursor from a store procedure

    i have a package with a procedure like this
    PACKAGE PKG_TEST IS
    TYPE data_cursor IS REF CURSOR;
    PROCEDURE PRC_GET_DATA( VAR_ONE IN VARCHAR2, IO_CURSOR OUT data_cursor ) ;
    END ;
    PACKAGE BODY PKG_TEST IS
    PROCEDURE PRC_GET_DATA( VAR_ONE IN VARCHAR2, IO_CURSOR     OUT data_cursor ) IS
    MENSAJE VARCHAR2(1000);
    CURSOR_AUX DATA_CURSOR;
    ERR_NUM NUMBER;
    ERR_MSG VARCHAR2(100);
    BEGIN
         OPEN CURSOR_AUX FOR
         SELECT ATTRIB1, ATRIB2 FROM TABLE WHERE (CODITION);
    IO_CURSOR := CURSOR_AUX;
    END PRC_GET_DATA;
    END;
    and, i have some troubles to call from JSP page...
    the java Source is
    Connection conn = source.getConnection();
    Statment stmt = conn.createStatment();
    CallableStatment cs = conn.prepareCall( {CALL PKG_TEST.PRC_GET_DATA( '%') } );
    ResultSet rset = cs.executeQuery();
    Some can help me?....

    I would not know about JAVA call Syntax to Oracle procedure in the code you are showing, Also it is not
    the right place for that question. How ever, I can see that your PL/SQL code needs some fixing
    before it can compile and run, hence some simple demonstrationSQL> create or replace package test_pkg as
      2  TYPE data_cursor IS REF CURSOR;
      3  PROCEDURE PRC_GET_DATA( VAR_ONE IN VARCHAR2, IO_CURSOR OUT data_cursor);
      4  END;
      5  /
    Package created.
    -- Please note that you need to put your SQL for ref cursors in single quotes
    -- Also look at the passing the WHERE condition to the SQL
    SQL> create or replace package body test_pkg as
      2  PROCEDURE PRC_GET_DATA(VAR_ONE IN VARCHAR2, IO_CURSOR OUT data_cursor) IS
      3    l_cursor data_cursor;
      4  BEGIN
      5    OPEN l_cursor for ('SELECT empno, ename from my_emp WHERE '|| VAR_ONE);
      6    IO_CURSOR := l_cursor;
      7  END;
      8  END;
      9  /
    Package body created.
    -- Then simply use the returned REF CURSOR in any program, I am showing PL/SQL program here
    SQL> Declare
      2     myCur test_pkg.data_cursor;
      3     vEmpNum Number;
      4     vEname  Varchar2(20);
      5  Begin
      6     test_pkg.PRC_GET_DATA('Sal > 1000', myCur);
      7     Loop
      8       Fetch myCur into vEmpNum, vEname;
      9       Exit When myCur%NOTFOUND;
    10       dbms_output.put_line(vEmpNum || '  ' || vEname);
    11     End Loop;
    12     Close myCur;
    13  End;
    14  /
    7369  SMITH
    7499  ALLEN
    7521  WARD
    7566  JONES
    7654  MARTIN
    PL/SQL procedure successfully completed.Might not be exactly what you are looking for, but from Oracle Forum, this is what is relevant.
    Good luck,
    Sri

  • How to debug noclassdeferror from java stored procedure.

    Hi,
    I am making use of OracleSoapHttpConnection class to call a webservice from a java stored procedure. I used loadjava to load the soap.jar, everything loaded without any error. We can see the "OracleSoapHTTPConnection" class loaded in the all_objects table, still during runtime we get noclassdeferror. I am not sure on how to set classpath for oracle database jvm.
    Many Thanks.
    Chandana

    Please don't post duplicate messages in the forum. You're just cluttering up the place. How to resolve a noclassdeferror for OracleSoapHttpConnection class
    Cheers, APC

  • How to abort exiting from a form

    Hi.
    I want to popup an Alert message which ask the user if he realy want to exit the Oracle Forms application. If he press 'NO' button I want to return to the aplication.
    I realize that I have to use POST-FROM triger to popup the alert message. I then don't know how to unvalidate the user exit.
    Any hint / example?
    Regards,
    Dezo

    You van try this in Post-Form trigger:
    DECLARE
    alert_button NUMBER;
    al_id     Alert:= Find_Alert('your_alert');
    BEGIN
    Set_Alert_Property(al_id, alert_message_text,'Do you want to exit ?');
    alert_button := Show_Alert(al_id);
    IF alert_button=ALERT_BUTTON1 THEN
    DO_KEY('Key_Exit');
    ELSE
    RAISE Form_Trigger_Failure;
    END IF;
    END;

  • How to extract row_id from PL/SQL procedure and assign that to batch script

    Hello Team,
    I am stuck with a requirement, wherein I am running a batch script and within the batch script I am calling a procedure which inserts a record in a table (Including a column named l_id).
    I need this generated l_id to be passed on as a variable to batch script after PL/SQL procedure completion. So that I can refer this same l_id to update the same record in the table again in the same batch script in the later part.
    Looking for some suggestions!!!!
    Thanks
    -Vj.

    789153 wrote:
    I am stuck with a requirement, wherein I am running a batch script and within the batch script I am calling a procedure which inserts a record in a table (Including a column named l_id). Operating system? Scripting language or command shell used?
    I need this generated l_id to be passed on as a variable to batch script after PL/SQL procedure completion. So that I can refer this same l_id to update the same record in the table again in the same batch script in the later part.
    Looking for some suggestions!!!!Don't do this using batch scripts. Batch scripts are very much inferior compared to stored PL/SQL code when it comes to managing databases processes and performing data crunching.
    Why can't this be written entirely in PL/SQL? And execution managed from either DBMS_JOB or DBMS_SCHEDULER ? And before answering that, consider the following:
    - what is the superior language, PL/SQL or shell script?
    - what provides tighter integration with the database, PL/SQL or shell script?
    - what provides proper security and access control, PL/SQL or shell script?
    As you can call SQL*Plus from a shell script to run PL/SQL, you can call a shell script from PL/SQL instead to run external commands and processes.
    Use the right tool for the job. And shell scripting is an excellent tool - but only when correctly used. Are you using it correctly? I strongly doubt that...

  • How do I exit from the "Star Wars" display?

    Hi all,
    I did my first Time Machine backup last night, and I think it went OK.
    Somehow, though, I hit the Time Machine icon during the backup, and I got into the "Star Wars" display. It wasn't showing me the progress of the backup, and it didn't show me when it was done. There was no way to get off this screen that I could find.
    How do you get out of the "Star Wars" display? (I didn't want to hit "ESC" because I wasn't sure if that would end the backup.) I'll be doing manual backups (this is for a MacBook Pro that won't be plugged into the external hard-drive all the time); I won't always have to sit with this "Star Wars" screen, will I?
    Thank you!

    The star wars screen and the process of backing up are two different things. The star wars screen is where you go to recover files, email, photos etc that have already been backed up. You don't have to be in this screen in order to back up because that happens automatically in the background. To exit, there is a cancel button in the lower left.
    Regards,
    Captfred

  • How do I exit from an FP Advise vi - cFP

    Hi All, I am fairly new to compact field point and am attempting to setup an "on change" Digital Input event.
    I have written some test code and I have had success in getting the core main functionality to work.
    [For this concept code I have wired DO 1 into D1 1]
    The problem that I have encountered is how to stop the "FP advise.vi" when I am finished with it.
    The only example I could find was for LV 5.0 which I couldn't open.
    http://zone.ni.com/devzone/cda/epd/p/id/2012
    The vi help advises:
    "Caution  Do not use the FP Advise (Polymorphic) VI in nonreentrant subVIs".
    I think that this is a clue, unfortunately, it is a bit too subtle for me.
    Thanks In advance.
    Tim L
    iTm - Senior Systems Engineer
    uses: LABVIEW 2012 SP1 x86 on Windows 7 x64. cFP, cRIO, PXI-RT
    Attachments:
    cfpIO.vi ‏17 KB

    Thanks Deborah,
    At this stage this is just a proof of concept VI.
    The second FP Advise call was an attempt to cancel the the first one (a bit like swallowing a spider to catch a fly), It was just a guess.
    The problem I have is that I cannot predict when the last loop is going to be called.
    I am using the inputs for user interaction,  When the operation has finished it is unlikely that there will be any more user inputs to allow the .VI to finish it's execution.
    I had discounted FP Close because it used an FP refnum.  I didn't realise it was a poly and works with the FP channels as well.
    Thanks for that!
    Added it to the code and got this message during deployment:.
    Deploying FP Close(IO).viFP Close(IO).vi loaded with errors on the target and was closed.
    LabVIEW:  Failed to load shared library FPLVMgr.dll:ialv_releaseServer:C. Ensure that the library is present on the RT target. Use MAX to install NI software or FTP to transfer custom libraries to the RT target.
    I have installed every possible library onto the device through MAX,  Got any suggestions?
    And for my next challenge, is there a way of using relative naming for the I/O ports.
    I want to write portable code.
    I am familiar with PC based systems and DAqMX and using property nodes to detect devices and available ports and combining them into portable code.
    So something like: Localhost\cfp2220 @0\Digital Input 1.
    I am finding the code and support for these functions appears to have be last updated in or before the LV7.1 Era and are now lying dusty and dormant.
    Tim L..
    iTm - Senior Systems Engineer
    uses: LABVIEW 2012 SP1 x86 on Windows 7 x64. cFP, cRIO, PXI-RT

  • How do I exit from chat picture view (Lumia 1320)

    Hi.
    Could someone hand me a trick to close picture view when I chat?
    Problem is is like this:
    I am on chat, someone sends picture.
    I can see square picture view, but to view full size picture I need to double-hit it
    I get full screen picture view, I can save picture and...
    Yes, how to get back to chat? I cannot close the full screen picture view and get back to chat!
    I need to kill skype and and reopen it.
    Help appreciated.
    Thanks.

    Hmm.
    I don't know what I did wrong before, but now when I tap 'back' button it gets back to chat.
    Seems like I have found solution, but I am pretty sure that before it it went back to previously opened application, not chat. Will keep testing

  • VARRAYS - how to use in sub procedures and how to empty them?

    Hi!
    I made a procedure where i use three diffrent varrays. I got it working only after
    putting all code in one big MAIN-block. Looks nasty.
    If i try to use sub-procedures i allways got ORA-06531-message.
    = "Reference to uninitialized collection"
    How can i use varrays in sub-procedures? Is there some trick in delcare or in procedure call?
    I try to use IN OUT parameters, but i didn't get it working. Run out of time in trial and error, of cource...
    I seemed to me that varrays aren't same way usable allover in code as all other variables i have declared.
    Is it so?
    Now the MAIN-block is long as a year... I'm used to code short MAIN-block with many sub-procedures calls.
    (In same procedure, not different procedures in db).
    Another problem is how to empty a varray in effective way?
    I tried my_varray.DELELTE and my_varray.TRIM but they won't do the thing. These remove/trim the elements but i just need to
    empty varray before fetching a new line from db. If I my_varray := NULL; then that same ORA-06531 when next read/write in varray.
    Now i just use FOR i IN 1..120 LOOP
    my_varray(i) := NULL;
    END LOOP;
    but there must be better way, hope so.
    Cheers,
    SL

    You were rigth "3360" - i had three varrays too many. Just to the grabage bin and some recoding.
    The link you posted show me the way: Associative Arrays
    - easy to declare, easy to use, works fine in sub procedures. Great - just what i need.
    Thanks alot!
    I fully agree W. Robertson on this:
    "I often see questions on technical forums about arrays in PL/SQL, which type to use and what the differences are. Although the documentation has quite a lot to say on the subject, I feel it tries to introduce too many concepts at once and ends up being confusing, especially when it comes to choosing between VARRAYs and Nested Table collections, where most of the "which to use" advice is about collection columns of database tables (which you probably don't need), and not about PL/SQL at all."
    - sl -

Maybe you are looking for