Calling a database procedure

I want to execute a procedure that is stored in the database . I am trying to place the
call in the when-button-pressed trigger.
What is the syntax for calling a procedure from when-button-pressed trigger ?
Thanks
Kim

Kimberly,
What are you expecting the procedure to do?
Server-side display output obviously doesn't work in the Forms environment, so no DBMS_OUTPUT.
If you're updating a table, are you checking the results via SQL*Plus? This will be a different database session from the Form and so any changes the Form makes will not be visible to other sessions until after you COMMIT.
(Sorry if I've been trying to teach Granny how to **** eggs, but I hope the above is of some help!)
Andy
null

Similar Messages

  • Calling a Database Procedure from an Oracle Form

    Hi,
    I have a question we will be calling the procedure from an Oracle form and through that can we pass like 1000 input values to this procedure and we need to return certain values back to the Oracle Form also. Here the proceduere take two or more parameters. Please advice.
    To receive the input values we have the input parameter of the procedure as type object, so that we can receive multiple parameter values.
    Thanks and Regards
    Srinivas

    user2626293 wrote:
    Hi Francois,
    Thanks for your response, please suggest me as to how we can acheive passing of parameters which can hold multiple values, while making a call to the database procedure from the Oracle Form
    Hi Srinivas,
    Here is an example of procedure...
    CREATE OR REPLACE PROCEDURE P_GET_SAL (P_EMPID NUMBER, P_SAL OUT NUMBER)
    IS
    BEGIN
         SELECT SALARY
         INTO P_SAL
         FROM EMPLOYEE
         WHERE EMPLOYEE_ID=P_EMPID;
    END;
    SQL> VAR G_SAL NUMBER;
    SQL> EXEC P_GET_SAL(100,:G_SAL);
    PL/SQL procedure successfully completed.
    SQL> PRINT G_SAL;
    G_SAL
          2300Hope this helps
    Hamid
    If someone's response is helpful or correct, please mark it accordingly.*

  • How to autopopulate fields in a portal form based on database procedure?

    Dear gurus, I am a newbie to the portal world and i have a rather unique problem. I have searched online but still cant find a solution to my problem. I have a portal form (AS version 10.1.4) based on a db procedure that accepts only one parameter. The form has about 12 fields, two of which are combo boxes. Because of the relationship b/n combo box 1 and combo box 2 and the rest of the form fields, the user has to start out by selecting a value in combo box 1. This auto populates combo box 2 (based on the previous selection). However, when the user selects a value from the populated combo box 2, this is supposed to trigger an action to query the database and retrieve values for the remainder of the form fields and populate them accordingly.
    I tried to use p_session.get and set values but discovered that one cannot do this with form fields that are based on a procedure. I could write javascript to call a database procedure but i am not sure how to pass the return values from the database back to the javascript routine and then populate the remaining fields accordingly.
    HELP ME PLEASE!!!
    Thanks

    Hi Venkat, create a section (section control) for each set of columns you want to hide/reveal. Put your columns in that section. Then set a rule on the dropdown so that if dropdown = "this" then show "this" section.
    cameron rautmann

  • CAN I PASS FORM VARIABLES TO THE DATABASE PROCEDURE IN PERSONALIZATION

    When I try to use form variable in the database procedure call from personalization I get the attached error.
    Under forms personalization
    From Actions tab --> builtin --> Execute Procedure when I call a database procedure and pass one of the form variable as parameter I get "ora-01008 couldn't be validate" error
    Can we pass on form variables to the database package using personalization ? If yes, then is this the right way?
    Message was edited by:
    omitchel

    I tried customizing the Quoting Form, it works.
    What you have done is correct, but this is how you call it
    ='begin
    db_proc('''||${item.qothddet_main.quote_name.value}||''');
    end'
    here
    qothddet_main : block name
    quote_name : item name
    Thanks
    Tapash

  • Hiding button after successfull call to databse procedure

    Hi,
    This is my first post and my first APEX app.
    I have a submit button that calls a database procedure passing parameters from the form.
    The procedure then updates the database record and the page shows the update which means its successfull.
    However the user can press the button again.
    I do not want the user to press the button again, so i want to hide it after successful completion of the databse procedure.
    I tried using Dynamic action and hide it that way by comparing the value that was updated by the database (P1_STATUS) and the
    value that the user wanted it updating to (passed as a parameter to db procedure P1_PARAM) but it does not work for the button for some reason.
    Is there a way round this by using javascript/apex computations etc.
    Any help would be appreciated or if you could point me in the right direction
    Thank you

    You can also hide it with javascript:
    onclick="$x_Hide(this);"However that will hide it at the outset and not when the DB procedure finishes. Don't know if that would be a functional problem for you or not. The advantage is that it will hide immediately so the user cannot press it again while the DB procedure is going.

  • Consume a HANA Database Procedure from an ECC system (Netweaver 7.31 sp 04)

    Hi All,
    Is it possible to consume a HANA Database Procedure (for that matter anything which is in HANA system) in an ECC system using ABAP?
    I checked the forums and it is mentioned that it is possible to consume from Netweaver 7.4 but we have Netweaver 7.31 sp 04.
    Any help in this regard will be greatly appreciated.
    Thank you.
    -Chandra

    Hi Chandra,
    You can use native SQL to call HANA database procedures or any other HANA views from ABAP.
    You can refer this link to get the more info on how to call native procedures using ABAP.
    http://help.sap.com/abapdocu_702/en/abenadbc.htm
    Hope this helps.
    Best Regards,
    Vaibhav

  • A Query regarding calling a DB procedure from a Crystal report

    Hi,
    Please tell me how can we call a database procedure from a crystal report  (crystal report XI)?
    I tried by selecting the procedure as a data source for the report; but its giving me an error "Invalid Argument Provided".
    The procedure contains a single Update table statement. Could anyone please help me to resolve this problem as early as possible ?
    Thanks & Regards,
    Priyashree Katkar.

    Duplicate of
    Crystal reports with a DB procedure
    Closing and locking this thread
    Ludek

  • How displaying an alert message called from a database procedure

    Hi,
    How can I display an alert message that is called from a database procedure.
    I've tried the following code:
    l_al_button NUMBER;
    l_al_message VARCHAR2(80);
    l_al_id ALERT;
    Set_Alert_Property(l_al_id, alert_message_text,l_al_message);
    l_al_Button := show_alert(l_al_id);
    When trying I receive an error that says that the word ALERT need to be declared.
    Any suggestions?
    Thanks

    Hi,
    leave the procedure without error handling.
    This is what you can do:
    1.Inside the database procedure-
    BEGIN
    RAISE_APPLICATION_ERROR (-20001, 'The chosen length of the Public Key Exponent ....');
    END;
    2.Into your Form -
    BEGIN
    EXCEPTION
    WHEN OTHERS THEN
    IF sqlcode = '-20001' THEN
    Display Your Messages.
    END IF;
    Monica
    END;

  • How to call MSSQL stored procedure from oracle database

    MSSQL and Oracle databases are linked thru ODBC link using Oracle HSODBC.
    I can query MSSQL table or view from Oracle Database using standard notation for acessing remote objects schema.object@dblink_name...
    Can anybody give me syntax for calling MSSQL stored procedure thru ODBC database link?
    I tried syntax exec schema.stored_procedure@dblink_name but it doesn't work...i'm getting schema.stored_procedure must be declared error...
    Tnx,in advance!
    Dejan Botica

    Oracle database 10gR2.
    MSSQL2000 database.
    For example query:
    select * from dbo.Tbl_Test@kron@dw_jamnica; works fine...
    ...while for example exec dbo.Test@kron@dw_jamnica;
    reports error:
    ORA-06550: line 1, column 7:
    PLS-00201: identifier 'DBO.TEST@KRON@DW_JAMNICA' must be declared
    ORA-06550: line 1, column 7:
    PL/SQL: Statement ignored
    Table Tbl_Test and procedure Test exists in MSSQL instance.
    Regards,
    Dejan

  • How to call database procedure in oracle forms

    Hi,
    Can anyone describe me that how I'll call database procedure in oracle forms (6i,10g)?
    Thanks in Advance.
    Baloch

    Hi Francois,
    As I created a procedure in database as below
    create or replace procedure For_table (tbl_of in number,st_pnt in number,en_pnt in number) is
    begin
    for i in st_pnt..en_pnt loop
    dbms_output.put_line(tbl_of||'*'||i||'='||tbl_of*i);
    end loop;
    end For_table;
    The above procedure is working fine when I'm using PL/SQL. I call the above procedure as
    begin
    For_table(3,5,20);
    end;
    but nothing happen
    Thanks in Advance.
    Baloch

  • Forms - Calls to stored procedures instead of standard database actions

    After discovering Reports, I'm now getting started with Forms in APEX. :)
    While I like the basic functionalities offered by the different Wizards, there's one thing that bothers me. After creating your form, you basically get 3 buttons (not counting cancel) for the different actions, each corresponding with a Database Action (SQL INSERT/UPDATE/DELETE). This is nice, but it's not exactly what I want. I would like to replace the direct database actions by calls to stored procedures (in a package), one for each action. It would be nice, of course, to keep the Wizard advantages, especially considering the fact I would like to find a standard, easy way to create forms. So, basically, I would like to create my forms this way, but instead of linking the button to a predefined database action, have it call a stored procedure. Is this somehow possible and what would be the easiest way to realize this?
    I'm running APEX 4.0.1.00.03 on an Oracle XE database.
    Erwin

    Okay, this was working nicely. But I must be missing something...
    I made an (interactive) report and added two link columns, one for the update and one for the delete (the insert is handled by a non-row related create button). I also created 3 forms on a procedure, one for each action (I/U/D). Now, when I call my form page from the report, I want to pass the values of the different columns of the selected record to this form, so the user can view and adapt them. Seems quite logical to me. There's only one problem. The column link seems to be limited to 3 items? Euh... am I missing something or is this not the way to do this.
    Let me illustrate this with an example.
    I created an UPDATE form, linked to a procedure to modify a given city.
    This procedure has the following parameters:
    - ID (hidden on the form)
    - PROVINCE
    - ZIP CODE
    - NAME
    - DESCRIPTION
    On the other hand, I have my report which gives an overview of the cities. This report has the following columns:
    - ID
    - PROVINCE
    - ZIP CODE
    - NAME
    - DESCRIPTION
    I also added 2 empty columns to contain the UPDATE and DELETE links. Basically, I just use these to place a nice icon for the different actions.
    Now, when I click on one of these icons, I want to pass the field values of the selected row to my form. In this case, that means I want to pass 5 values to the 5 items of my form. BUT, under the link column, I see only 3 items? Am I missing something really stupid or am I handling this the wrong way?
    Erwin

  • Is it possible to calling another stored procedure in another database?

    Hello all, I hope you can help me out.
    I need to call another stored procedure in another database? Is it possible?
    I know you can call another stored procedure in the same package:
    Var_SQL :='call SP_Tes (''' || Var_1 || ''',''' || Var_2 ||''')' ;
    EXECUTE IMMEDIATE Var_SQL;
    But how do call it if its in another database? I assume, I'd have to open a new connection to it, then call it...
    Please help me. thanks

    I managed to find my synonym;
    select synonym_name, table_owner, table_name from all_synonyms where synonym_name = 'PKG_EDONWEB70'
    (BTW, its upper case sensitive, I eventually found out)
    But as you said; "anyway, what..."
    1)Crete synonym with the dblink, which is the same DB as the one I'm using:chec
    create public synonym pkg_edonweb70test2 for [email protected]
    Result: ok2)check it exists:
    select synonym_name, table_owner, table_name from all_synonyms where synonym_name = 'PKG_EDONWEB70TEST2'
    Result: ok3)check it runs in sql:
    DECLARE
        P_RETURNVALUE1 number;
    BEGIN
        PKG_EDONWEB70TEST2.SP_TESTSMB_DESTINATION ( P_RETURNVALUE1 );   
        COMMIT;
    END;
    Result: ok4)Add it to the strored procedure that is going to call it
    PROCEDURE sp_testSMB_origin(P_RETURNVALUE1 OUT number) IS
            thissql varchar(1000);      
        BEGIN
        BEGIN
            PKG_EDONWEB70TEST2.SP_TESTSMB_DESTINATION ( P_RETURNVALUE1 );   
            COMMIT;
        END;
        end sp_testSMB_origin;
    Result: FAIL; pls-00201: identifier 'PKG_EDONWEB70TEST2' must be declared

  • ORA-06553: PLS-908 when calling 10g remote procedure from 11g database

    Hi,
    I have 2 instances: 11g (11.1.0.7) and 10g (10.2.0.4). When I try to call 10g (remote) procedure from 11g database, there is errors:
    ORA-04052: error occurred when looking up remote object CUSTOMER.PRL_PK2_GENERAL@CUSTOMER_LINK
    ORA-06541: PL/SQL: compilation error - compilation aborted
    ORA-06553: PLS-908: The stored format ofCUSTOMER.PRL_PK2_GENERAL@CUSTOMER_LINK is not supported...
    But, if I call the same procedure from another 10g instance, it's OK.
    How can I fix the problem?
    Thx,
    qtpham

    As you can see ,it seems like the workaround that was mentioned there is currently the only way to remove this ORA.
    Workaround: Remove the function call(s) from the called subroutine's
                package's spec.

  • Database procedure called from Forms

    If a database procedure that updates a table is called from Oracle Forms, does it commit the changes automatically or do you have to issue a commit in Forms to commit the changes the database procedure has done, assumming there is no commits in the database procedure.
    I'm not sure since I have seen cases where a commit was needed after the database procedure has been called and a case where a commit was needed. I checked the database procedure and there was no commits, there was a commit above the statement where the procedure was being called.

    <BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by NAB ():
    If a database procedure that updates a table is called from Oracle Forms, does it commit the changes automatically or do you have to issue a commit in Forms to commit the changes the database procedure has done, assumming there is no commits in the database procedure.
    I'm not sure since I have seen cases where a commit was needed after the database procedure has been called and a case where a commit was needed. I checked the database procedure and there was no commits, there was a commit above the statement where the procedure was being called.<HR></BLOCKQUOTE>
    Database procedure do have commit. You can issue commit in the procedure itself.
    null

  • Calling database procedure in forms

    Hi,
    i am calling the db procedure thru oracle forms.
    i will be calling some of the forms thru the procedure.
    i need to know is there any builtin in forms like sleep command in unix.
    I wanted to delay to process for 30 sec then, needs to continue.
    Please let me know, if anyone know.
    Thanks a lot
    Regards
    nag.

    Try:
    DBMS_LOCK.SLEEP(30);

Maybe you are looking for

  • Data In R/3 is present but not in BW

    Hi experts i got thiss problem in last extraction i have 5 fields in r/3 which having data but in BW one feild is not getting data remain 4 r showing data what could be the problem ? n how to solve it?plz let me know Thanks in advance. bye jay

  • How to upgrade from OS X 10.4.11 to mountain lion?

    i recently got a macbook and it is quite an old one because its second hand, and it has software version 10.4.11 on it. i've had troubles downloading things because no programs are built for such old software. i think the only way to get past this is

  • Cannot reset office 2010 from uninstalled AD RMS server

    Hi; For test purposes i was installed and successfully deployed RMS server few mounts before. (2008 R2) (windows7 office 2010) But cuz of it doesnt work on portable devices we decide to cancel that project. But now problem is my clients office progra

  • 5508 License Question

    Dear Friends, I have two 5508 WLC, one of them is in Active, and the second one is in Standby mode Standby WLC inherited 100 AP license from Primary(Active) WLC, the question is if i add license with Adder license will the second WLC inherit those ad

  • I'm having trouble signing in my iPod .. It says use the Apple ID to sign in

    I need help getting on my iPod .. It won't let me on there