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

Similar Messages

  • Dbms_job.submit procedure called from Forms

    Folks,
    Since the DBMS_JOB.SUBMIT cannot be executed directly within a form, I created a simple procedure on the database which makes the call to DBMS_JOB.SUBMIT as follows:
    FUNCTION web_newsletter_submit_job(p_letter_id NUMBER) RETURN NUMBER IS
    v_jobnum NUMBER;
    BEGIN
    DBMS_JOB.SUBMIT (v_jobnum, 'send_mail_html2 (''DailyRacingForm<[email protected]>'', ''[email protected]'', ''DailyRacingForm<[email protected]>'', ''test subject'', ''test body'');',
    TRUNC(SYSDATE) + 22/24);
    RETURN v_jobnum;
    END;
    From SQL/Plus I can declare a varialbe and execute this procedure as follows:
    v_jobnum := web_newsletter_submit_job(22) ;
    then I can view the v_jobnum and find the job in the DBA_JOBS table.
    My problem is when I execute the 'web_newsletter_submit_job' function from with Forms, my job never gets created. The function actually returns a job number and my Form display it via the Message() function; however, the job number never shows up in DBA_JOBS table.
    Any ideas why I can successfully create the job from sql/plus but not from Forms ???
    Regards,
    Bob

    you made a FORMS_DDL('COMMIT') right? without commiting, the jobe will never get executed.
    Cheers, Stefan

  • Stored Procedure call from JDBC sender for Oracle Database

    Hi,
    I have a requirement to call stored procedure using JDBC sender adapter for retriving data from an Oracle database.
    I need to execute first stored procedure call from Querry SQL statement and then trigger second stored procedure call for confirming the succesful retrival of those records from the update SQL statement.
    Querries:
    1. Can we trigger stored procedure from Update statement of JDBC sender.
    2. Can we call stored procedure from Querry statement, since I have read on other sdn threads that stored procedure calls on Oracle database are not allowed. If not possible to have "Execute stored procedure" would the function call (select * from table(function name)) work same as stored procedure.
    3. In a JDBC sender the Querry statement and Update statement are executed in same session call and same database connection. What happens if the querry statement was not succesful, would the update be still triggered.
    Please note PI does not have direct access to main table and hence the need to have separate stored procedure calls.
    The PI version is PI 7.11 sp4.
    Appreciate your inputs.
    Thanks.
    Siddhesh S.Tawate

    >1. Can we trigger stored procedure from Update statement of JDBC sender.
    I think not possible using update statement.
    > Can we call stored procedure from Querry statement, since I have read on other sdn threads that stored procedure calls on Oracle database are not allowed. If not possible to have "Execute stored procedure" would the function call (select * from table(function name)) work same as stored procedure.
    Yes using select query you can call stored procedure.
    >. In a JDBC sender the Querry statement and Update statement are executed in same session call and same database connection. What happens if the querry statement was not succesful, would the update be still triggered.
    No select and update handles in the same session using the same thread so if one transaction fails update should not proceed.

  • 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

  • 4.5 to 6i migration or report calling from forms in XE???

    Hi Friends,
    I really appreciate your helping tendency. Let me explain the whole scenario.
    My application basically consists of
    Forms [32 Bit] Version 5.0.6.8.0 (Production)
    Report Builder 3.0.5.8.0
    Oracle Enterprise Edition Release 9.2.0.1.0 - Production
    Now we migrated our database into Oracle Database 10g Express Edition Release 10.2.0.1.0 - Production. After the migration all the existing forms and report individually were running without any problem. But there was a huge problem. Whenever I tried to call any report from any form the report engine appeared and then stopped responding. So report calling from forms was not possible after the database migration. I was suggested by someone from OTN forum to migrate my forms and reports into 6i. I have started doing the migration using ifcmp60. WIth forms 6i, reports can be called from forms. But I am facing problem in every other steps. There are many things are not working after the migration though the migration log shows no error. For example, COMMIT_FORM, EXECUTE_QUERY (for detail table), LOV, TOOL.GETVAR lots of things are not working.
    My application has 200 forms and 250 reports.
    Please help and advise on:
    How to call reports from form when the database is XE Or
    How to overcome the stated migration problem
    Rgds,
    Luther

    Dear Mark:
    I have two choices. I can either migrate to 6i or I can go with the existing 4.5. If I go with 4.5 ......the reports are not being called from forms. This problem is happening after I changed the database from 9i to XE. Please advise what to do so that I can keep my forms in 4.5, database in XE and can call reports from forms.
    Rgds,
    Luther

  • Reports are not called from form in browser plz help

    Hi,
    I have installed 9iAS+8.1.7 database on the same machine with NT4 server.My system's forms(.fmx) are running well but my reports are not running from my main form.i call reports from the
    from as,
    Run_Product(reports,'..\iReports\xglrxx12.rep',synchronous,RUNTIME,FILESYSTEM,pl_id,null);
    Actually want to know the report's setting when calling from the from in a browser(environment variables,virtual paths etc.).
    My database is installed in drive E:\8idb_home\ and 9iAS is on
    G:\9iAS_home\.My systems .fmx & .rep files are in "iforms" and "ireports" folder respectively.
    Plz help!
    Many thanks!

    Hi,
    First of all thanks to Vincent Botteman for solving the prob.
    Yes when i changed my call of run_product by excluding the path i have specified when calling from form it then makes a result.
    Also specified the entry of your reports .rep files by giving path in reports60_path registery variable as,
    Run regedit-->Hkey_Local_Machine-->Software-->Oracle here give the full path of your .rep files as an first entry in reports60_path variable.And finally not mention the path when calling reports from form as,
    Run_Product(reports,'xglrxx13.rep',synchronous,RUNTIME,FILESYSTEM,pl_id,null);<--- Correct way.
    Run_Product(reports,'..\iReports\xglrxx13.rep',synchronous,RUNTIME,FILESYSTEM,pl_id,null);<--- Wrong way.
    Regards!

  • Execution Times of Stored Procedures Called from Other Stored Procedures

    If I execute sys.dm_exec_procedure_stats, it will produce execution times of my stored procedures executed recently.
    However, stored procedures called from other stored procedures do not show up.
    Is there code that can return the execution times of stored procedures even though they are called from other stored procedures.

    Look at the example. It is counting nested execution.
    CREATE PROC z1SP AS SELECT * FROM Production.Product;
    GO
    CREATE PROC z2SP AS SELECT * FROM Production.Product WHERE Color is not null; EXEC z1SP;
    GO
    SELECT object_name(2002822197), object_name(2034822311);
    --z1SP z2SP
    EXEC z1SP; EXEC z2SP;
    GO 10
    SELECT * from sys.dm_exec_procedure_stats
    database_id object_id type type_desc cached_time last_execution_time execution_count
    16 2002822197 P SQL_STORED_PROCEDURE 2014-12-16 13:02:45.170 2014-12-16 13:02:46.717 20
    16 2034822311 P SQL_STORED_PROCEDURE 2014-12-16 13:02:45.460 2014-12-16 13:02:46.687 10
    Kalman Toth Database & OLAP Architect
    SQL Server 2014 Database Design
    New Book / Kindle: Beginner Database Design & SQL Programming Using Microsoft SQL Server 2014

  • Need to do a commit in a procedure called from a trigger

    How do I get around the need to do a commit in a procedure that is being executed from a trigger. I know it can't be done but I bet someone has a workaround. Thanks.

    Hi
    Why do you want to do a commit in a procedure called from a trigger?
    Anyway if you are running Oracle 8i+ you can declare the procedure as an Autonomous Transaction and can issue a commit, eventhough it is called from a trigger.
    HTH
    Arvind Balaraman

  • Graph developed in 6i to be called from forms 9i on web?

    Hi Every one
    Can you please send me a sample form calling the Graph developed in 6i to be called from forms 9i on web? Any help will be appreciated
    waiting for prompt reply.
    Thanking you,
    Binish

    Hi Every one
    Can you please send me a sample form calling the Graph developed in 6i to be called from forms 9i on web? Any help will be appreciated
    waiting for prompt reply.
    Thanking you,
    Binish

  • Reports 10g calling from forms 10g

    try reports 10g calling from forms 10g ,but I not do.
    Programme have frm-41213 unable repserver.. error and I am not start up oracle reports server from services. please help me.

    Dear Lida;
    i use this code
    rwserver -install repsername
    but in release 3 it is not work and i had to write it like this
    rwserver server=repservname
    the first code make the report server work as service could u tell me how the first code work with realease 2 but in realeas 3 not working ?
    and thkx alot in advance
    regards
    Reda El Mitwally

  • MS SQL Procedure Call from Oracle Database

    I have Oracle Database 11g connected to MS Sql Server 2008 via dg4msql, and need to execute procedure on MS Sql with parameters from Oracle, and get dataset (table) as a result.
    I'm not sure is it possible to call procedure directly from Oracle; One solution would be make function on MS SQL, and put select on procedure from Oracle, but what with parameters?
    Is there some possibility to call this procedure from Oracle and get this dataset as a cursor?
    Thanks in advance!
    Edited by: mihaelradovan on 2012.04.26 14:35

    Yes, of course I have DB Link in Oracle and procedure in SQL Server.
    Btw, I can select data from SQL Server table.
    I made one function in SQL Server, and I can not make select on this function, but in SQL Server I made view as select * from function_name, and select on this view from Oracle works. But problem is I have to call this procedure or function with parameters, and with view I can not do this.
    So, I must call procedure or function with parameters directly. I made all by the book (Oracle® Database Gateway for SQL Server User’s Guide), but probably I miss something...

  • Report call from forms and 1017

    Hi,
    we have a web application and and it's first screen is the login screen where user can change their password or when grace time comes we force the user to change their password etc. Password changes successfully, no issue and user goes inside the application. But here is the problem. When user clicks the report after chagning the password then report doesn't work, can't connect to database and audit trail shows 1017 so obviously when they click 3 times their account gets locked because in profile it's set to 3 failed attempts. When user close the application and re login again and then click the report, it works fine. I'm suspecting the new changed password doesn't pass to the report? i would really appreciate for your help, suggestions, advise. how do i make sure that the new changed password should be passed to the report?. We're running against 11g database and sec_case_sensitive_logon is set to false.
    Thanks
    RM

    Thank you for replying.
    Forms and Report Version:
    Forms [32 Bit] Version 10.1.2.3.0 (Production)
    Report Builder 10.1.2.3.0
    ORACLE Server Release 10.1.0.5.0
    We have a common procedure in the forms Obj Libarary which is called from WHEN-BUTTON-PRESSED trigger.
    Here is the common procedure:
    PROCEDURE EP_RUN_REPORT
                             (     as_in_rep_name      IN     VARCHAR2,
                                  as_in_plist               IN     PARAMLIST,
                                  ab_in_printer          IN     VARCHAR2     DEFAULT NULL
    IS
         ls_rep_id           REPORT_OBJECT;
         ls_job_id               VARCHAR2(300);
         ls_status           VARCHAR2(20);
         ls_url                    VARCHAR2(120);
         ls_rep_server     VARCHAR2(100);
    BEGIN
         TOOL_ENV.GETVAR( 'REP_SERVER' ,ls_rep_server );
         IF ls_rep_server IS NULL THEN
           pkg_alert.ep_alert('E','ERROR GETTING ENVIRONMENT VARIABLE');
           RAISE FORM_TRIGGER_FAILURE;
         END IF;
         ls_rep_id := FIND_REPORT_OBJECT (as_in_rep_name);
         IF ab_in_printer     IS NULL THEN
              SET_REPORT_OBJECT_PROPERTY(ls_rep_id, REPORT_DESTYPE, CACHE );
              SET_REPORT_OBJECT_PROPERTY(ls_rep_id, REPORT_DESFORMAT, 'PDF');     
         ELSE
              SET_REPORT_OBJECT_PROPERTY(ls_rep_id, REPORT_DESTYPE, PRINTER );
              SET_REPORT_OBJECT_PROPERTY(ls_rep_id, REPORT_DESNAME, ab_in_printer);
         END IF;
         SET_REPORT_OBJECT_PROPERTY(ls_rep_id, REPORT_SERVER,  ls_rep_server );      
         SET_REPORT_OBJECT_PROPERTY(ls_rep_id, REPORT_OTHER, 'PARAMFORM=NO');
         ls_job_id := RUN_REPORT_OBJECT (ls_rep_id, as_in_plist);     
         ls_status := REPORT_OBJECT_STATUS(ls_job_id);
         WHILE ls_status in ('RUNNING','OPENING_REPORT','ENQUEUED')
         LOOP
              ls_status := REPORT_OBJECT_STATUS     (ls_job_id);
         END LOOP;
         IF ls_status = 'FINISHED' THEN
              IF ab_in_printer     IS NULL THEN
                   TOOL_ENV.GETVAR('URL',ls_url);
                   IF ls_url IS NULL THEN
                     pkg_alert.ep_alert('E','ERROR GETTING ENVIRONMENT VARIABLE');
                     RAISE FORM_TRIGGER_FAILURE;
                   END IF;
                   WEB.SHOW_DOCUMENT(     ls_url ||
                                                                     'reports/rwservlet/getjobid'||
                                                                     SUBSTR(ls_job_id, INSTR(ls_job_id,'_',-1)+1)||
                                                                     '?'||'server='||ls_rep_server,
                                                                     '_blank');
                   ELSE
                        NULL;
                   END IF;
         ELSE     
           pkg_alert.ep_alert('E','ERROR WHILE GENERATING REPORT');
           RAISE FORM_TRIGGER_FAILURE;
         END IF;
    END;Is there any other option beside giving the message?
    thanks again.
    RM

  • How to reference or use a database procedure in a form

    I have a database procedure(any database object in the form) Pls tell me how to reference it in the form
    I will appreciate if I can get an example.

    Hi,
    if its in the same schema you are connected to, just call it by packagename.procedure from a Plsql program unit or trigger. Make sure you don't have a procedure with teh same name defined in Forms itslef.
    Frank

  • How to run database procedure in oracle form

    Hi,
    I have created a database procedure, it run successfully at server side, but I need to run it on oracle form, how I'll do ?
    Thanks
    Baloch

    Baloch,
    Essentially, you call your database stored procedure the same way in Forms as you do in SQL Plus. The difference is that you need to call the procedure in a Forms Trigger versus a SQLPLus prompt. The Forms user must have execute privileges to the stored procedure as well. The Forms trigger depends on when and where you need the procedure to run. For example, if you need the procedure run in conjunction with a button pressed in your form, you would code your When-Button-Pressed trigger to call the stored procedure. If the db user is different fro.m the Forms user, make sure you fully qualify the call to the procedure.
    Here is a small code sample to demonstrate:
    /* Sample When-Button-Pressed trigger */
    BEGIN
       IF <Condition is true> THEN
          /* Call Database procedure */
          SCHEMA.PROCEDURE_NAME(<any procedure parameters here>);
       END IF;
    END;This is a very basic example, but it should make the concept clear. ;)
    Hope this helps,
    Craig B-)
    If someone's response is helpful or correct, please mark it accordingly.
    Edited by: CraigB on Jul 22, 2010 10:57 AM
    Edited by: CraigB on Jul 22, 2010 11:02 AM
    Edited by: CraigB on Jul 22, 2010 11:04 AM
    Edited by: CraigB on Jul 22, 2010 11:04 AM

  • DB connection in JavaBean called from Forms 6i

    Hi, after going through a lot of documentation, I still can't find a proper solution for connection issues to the database within a javabean called from Oracle Forms 6i patch 13.
    I developed a javabean which will download (export) a BLOB field from the database to the local file system. Everything works fine and the file gets downloaded to client machine. My only concern is that, to access the data within the bean, I need to connect to the database again from the java code(I believe there is no way to keep the connection between the forms session and the bean). For this I use the jdbc oracle thin driver. This works fine if the database is visible over the internet (for the client to see it), but the only machine I would like to expose is the application server (which is also my web server) running Apache / Jserv with forms listener servlet. The database is visible from the app server.
    If my client machine is X and my app server is Y and my database server is Z, can anyone give me an answer how to connect from X to Z with Z only visible to Y and Y visible to X (www).
    I assume using servlet code which executes on Y might be an option, but how do I implement a servlet to be executed from forms?
    This is the only bottleneck I have before rolling out my system to the client, I will appreciate it if anyone can assist me regarding the above.
    Best Regards,
    Jacques Rossouw

    There is no way to see the Forms Conenction from within the JavaBean as you point out.
    There are a couple of approaches to this problem both of which I've used:
    1) Use Java Code on the App server to read the blob from the database and dump it to a file in a location visible as a virtual directory on the app server (you can use the Java Importer to hook this into Forms).
    Then in your bean have something like this:
    URL src = new URL(sourceURL);
    if (src != null)
    BufferedInputStream in = new BufferedInputStream(src.openStream());
    FileOutputStream out = new FileOutputStream(localFile,false);
    etc.
    2) You can read the Blob in PL/SQL using DBMS_LOB and base64 encode it into a string. then send the string to the bean using Set_custom_property (probably in chunks!) and re-assemble and de-code in client side java.

Maybe you are looking for