How to call sequence Oracle Forms

Hello

I use Oracle Developer Suite 10 g. I want to call a sequence that I created in sqlplus. When I try to call the sequence in a trigger for a command button on the compiler (WHEN BUTTON PRESSED) tells me that the sequence cannot be used in this context. I'm passing the sequence of a procedure as a parameter. Let me show you the code:

My table is:

Location (loc_id, loc_name);
the primary key is loc_id

My sequence is:

CREATE SEQUENCE loc_seq
MINVALUE 1
MAXVALUE 999999
START WITH 1
INCREMENT BY 1
CACHE 20;

My procedure is:

CREATE OR REPLACE PROCEDURE loc_change (Location.loc_id%TYPE, v_loc_name IN Location.loc_name%TYPE IN v_loc_id) HAVE
BEGIN
INSERT IN the slot (Location.loc_id, Location.loc_name)
VALUES (v_loc_id, v_loc_name);
COMMIT;
END loc_change;

My shutter button PRESSED WHEN KEY is

BEGIN
loc_change (loc_seq.nextval,: DATA_BLOCK.) VARIABLE);
END;

All I have to do is generate a random number to the parameter passed is the primary key for the location of my trigger. Any thoughts?

This

DECLARE
  nSeq number;
BEGIN
  select loc_seq.nextval
  into nSeq
  from dual;
  loc_change(nSeq, :DATA_BLOCK.VARIABLE);
END;

should do the job...

You can also put the recovery of the sequence in the database procedure. If you have the Version 11 g of the DB, you can reference the sequence simply by this:

nSeq := loc_seq.nextval;

prior 11g it must go and look using select in the doubles.

concerning

Tags: Oracle Development

Similar Questions

  • How to call in oracle Forms environment variable

    Hello
    We have a custom application that uses the EBS 11i application server.

    In one of the forms that we use

    HOST (cp < file > < $APPL_TOP/log /. >)

    Who works fines in 11i.

    Recently, we went to R12. But now the same shape is not copy file when we

    HOST (cp < file > < $APPL_TOP/log /. >) in the forms.

    But if we replace $APPL_TOP with the actual value, it works very well.

    Which means forms is not picking up $APPL_TOP. Is it possible to make the Forms Server recover all environment variables.

    I checked $ORACLE_HOME/forms/server/default.env in 11i, it does'nt be all about variables for $APPL_TOP.

    I should put it in default.env

    Thank you

    Yes, sounds like it (assuming you are using default.env in the configuration)

    You can then get the help of variables: Tool_Env.Getvar ('MY_VARIABLE', v_value);

  • How to check the oracle forms?

    Dear friends,

    OS: RHEL AS 3
    DB: 9i R2
    Forms: Developer 6
    pc clients: Windows XP sp2
    Forms Server: novell 4.8

    How to check the oracle forms? for example, we have developed the forms using Developer 6. We would like to know which user accesses the number 152 of the form or the form name hrform.fmx
    Because, every time make us changes in the forms we need more fmx if the user accesses this form so we can not crush him in our novell server.
    Usually, we use a windows scheduler in the night to copy forms. so, if we know the user who has not disconnected from our system. the next day, we ask the user.

    Thank you

    Take a look at

    sys. DBMS_APPLICATION_INFO.set_module

    and

    sys. DBMS_APPLICATION_INFO.set_client_info

    and call these package with good info in each of your form in for example the trigger a TIME NEW FORM INSTANCE...

  • How to call an oracle forms6i calander

    Oracle Forms 6i

    Hai All

    How to call a schedule for a botton. I have my form, I have a button called date of treatment when I press a button the calander need to display and select a date and I need the date of treatment. How can I do this Pls Me say

    Any help is extremely Appricateable


    Thanks and greetings

    Srikkanth.M

    Ok
    I thinik it is included in the installation program. I remember well.
    Anyway,.
    Follow these steps...
    1. just download the calendar90.zip go to the following link as mentioned in one of the post office.
    http://www.orafaq.com/Forum/t/29418/2/

    2. for civilian use in you forms 6i just use step by step in this presentation. It starts from 35th presentation page. Just follow the steps described in the presentation. Then, you'll be able to set the timetable in you forms.
    http://www.montgomerycollege.edu/~ggrinber/272/present/12CH.ppt

    I now think it should be easy and should work ;)

    -Clément

  • How to call sequence into LabVIEW, by providing the path of the sequence files.

    Hello

    Please give me a solution for call sequence from the API ActiveX LabVIEW file by entering the path of the LabVIEW user interface sequence.

    Thank you

    Wherry

    Here is a link I gave some pointers on how to run a file opened via Single Pass sequence.

    http://forums.NI.com/T5/NI-TestStand/direct-execution-of-the-sequence-when-UI-launches/m-p/2000819#M...

    How are you going to start this sequence is the user who selects the sequence on the disk?    Is already open in a SequenceViewMgr control?

    An operator interface would be more applicable to your situation?

    Thank you

    PH

  • How to run the Oracle form window in the center of the browser?

    I want to run Oracle form in the middle of the browser window. When I run the form in the web it start on the left side.

    How can I change this environment forever?

    Dear Faisal Ahmed Odile ,

    Try the following code

    SET_WINDOW_PROPERTY(FORMS_MDI_WINDOW, WINDOW_STATE, MAXIMIZE);
    SET_WINDOW_PROPERTY('', X_POS, (GET_WINDOW_PROPERTY(FORMS_MDI_WINDOW, WIDTH ) - GET_WINDOW_PROPERTY('', WIDTH )) / 2);
    SET_WINDOW_PROPERTY('', Y_POS, (GET_WINDOW_PROPERTY(FORMS_MDI_WINDOW, HEIGHT) - GET_WINDOW_PROPERTY('', HEIGHT)) / 2);
    

    Manu.

  • How to connect to Oracle Form Builder - Oracle Developer Suite 10 g - Windows 7

    Hi brothers and sisters.

    Hope that you are well. I installed Oracle Developer Suite 10 g on Windows 7 successfully and that it works correctly. But when I connect to Oracle Form Builder using Connect window asking:

    a. user name of
    b. password
    c. database

    a message box appears: "ORA-12154: TNS: could not resolve the connect identifier specified '.

    I check my String to connect with: ' SELECT * FROM database of v$ ', but the problem remains the same.

    Please help me how can I connect to Oracle Form Builder.

    Noor

    Hello

    Please use Net Configuration Wizard or set tnsnames.ora with string and computer name to connect.

    NET Configuration Assistant.
    When its open then go to.
    * The local Net Service name configuration.
    * Click Next.
    * Add.
    * Click Next.
    * Name service - Type here connect the String which is XE or any connection string.
    * TCP.
    * Click Next.
    Host name - enter computer name or Ip address.
    * Yes, perform a test.
    you enter the right password and username here.

    Note:-your database should be Up if it's not high, it will be by the same error please start your database first.
    Sarah

  • How to call a jsp forms of oracle10g page.

    Hello
    I use forms.can oracle10g I call a jsp to oracle10g form? If it is possible how to call a jsp page? How to call back form of jsp? Thank you.

    Published by: Jean Elo diakite 27 April 2010 20:21

    Published by: Jean Elo diakite 27 April 2010 20:22

    What is argument _blank? How to pass this value?

    Its already the correct value of _blank as arguments Mithraeum opens a new browser window.

    where to put jsp (web page)?

    in the url

    How to maintain session of form in jsp?

    You can not. What you could do, it's pass the username to the jsp.

    So a call to a jsp page looks like this

    WEB.SHOW_DOCUMENT('http://server:port/path/the_name_of_the_jsp.jsp', '_blank');
    
  • How can I change oracle Forms appearance

    Hi all

    Please help me change the look and feel of oracle forms...


    Kind regards

    Nycy

    Hello

    +"... But do not know how to start?... « +

    The book you talk explains how to install the feature, and the zip file contains a lot of sample to test dialog boxes.

    François

  • How to run the oracle form without using a web browser

    I am a new developer in Oracle Form builder.
    Could someone tell me how can I use oracle without using a web browser?

    Bravo,

    N ° Web, since Forms 9i versions, are Web Client and needs an application server to run the forms runtime.

    François

  • How can we replace Oracle form when you used by another user

    Hi Experts,

    Is it possible to replace Oracle form while in use by another user?

    Some time need deliver urgent fixes on the production environment, but it must wait for downtime, and the form does not use.

    I searched the Forum, but able to get the answer to this topic, I will be grateful if you could provide no alternative to do this.

    Env:

    Windows Server 2008 R2

    WebLogic Server 10.3.5

    Oracle form & report 11.1.2

    Hello

    For Production environment, it will be handled with tactics that led to minor maintenance work as well.

    You must have two physical directories (real and temporary) including the same fmx/plx/pll/mmx, files etc.

    and a file reference of in the FORMS_PATH in default.env, who have the latest version of the source.

    Copy the last source file into a temporary directory, when the user take the new session, it will access the new version of the source of the temporary path and who obviously last source version.

    Meanwhile, once the actual source published by the user version, you can copy the latest version of the source to the real directory and reset the FORMS_PATH with the actual path.

    In this way, you can solve your problem.

  • How to call from one form to another form when you press the button.

    Hi all...

    I have two forms "A" AND "B".

    A form contains two items of text as->customer_id and total_amount

    B form contains two 4 text items like-> customer_id, total_amount, paid_amount and balance.

    A form has a button, pressed button this form must call form b and then the text element of form B customer_id,total_amount take values automatically from shape A customer_id ,total_amount .

    PLEASE HELP ME...

    I call form B from A, with success, but don't understand how to take values automatically from form A fom B...

    Try the PL/SQL code that is used to trigger when-pressed next button:

    Declare

    pl_id ParamList;

    BEGIN

    pl_id: = Get_Parameter_List ('tmpdata');

    IF this is Id_Null (pl_id) THEN

    Destroy_Parameter_List (pl_id);

    END IF;

    pl_id: = Create_Parameter_List ('tmpdata');

    Add_Parameter (pl_id, 'customer_id", TEXT_PARAMETER,: Customer_id");

    Add_Parameter (pl_id, 'total_amount', TEXT_PARAMETER,: Total_amount);

    OPEN_FORM ("B", ACTIVATE, No_Session, pl_id);

    END;

  • How to call CCI Oracle from a command line

    Hello everyone.

    I already asked the following question on Stackoverflow.com , but unfortunately, no one was able to answer, yet. So feel free to respond here or on Stackoverflow - I'll keep track of it and synchronize the answer to each community.

    I have successfully installed the Oracle Code compliance Inspector (CCI) to JDeveloper extension by following the instructions. Later, I was able to run the BCC in JDeveloper. But I'm not able to invoke the Oracle BCC from a command line.

    I can't find the script ("checkCompliance.sh"), mentioned in the documentation. There is no part of the zip file that I downloaded from the oracle.com.

    I tried to execute the compliance.policy.engine.jar file directly, but it fails with an error message:

    java -jar /oracle/jdevhome/jdeveloper/jdev/extensions/oracle.fp.compliance.inspector/lib/compliance.policy.engine.jar -inputDir /AIA/demo -outputDir /ComplianceOut

    Could not load the manifest attribute of hand-Class /oracle/jdevhome/jdeveloper/jdev/extensions/oracle.fp.compliance.inspector/lib/compliance.policy.engine.jar


    Any suggestions on how to invoke the ICC from a command line or where I can find the script mentioned in the documentation?

    About the error message that I read that this can be corrected by adding a manifest file in the archive jar that defines the main class - but what is the main class of this jar file?

    Thanks in advance for your help.

    Well, it's resolved.

    As mentioned in this part of the documentation, the BCC command line tools are distributed with OER.

    The BCC command line tools are distributed with REL in the /tools/solutions/- ComplianceInspector.zip.

    What confused me: REL-download contains only a single .jar file. It took me time to realize that the .jar file is an Installer (installation documentation).

    After properly installing OER, I found the - ComplianceInspector.zip in /repository111/core/tools/solutions /.

    The - ComplianceInspector.zip actually contained the checkCompliance.sh file.

  • How to call the procedure Oracle in ODI

    Hello

    I use ODI 10 g.

    Before you run the interface in a package, I wanted to place my procedure.

    I created the procedure in d/b (target)

    CREATE OR REPLACE PROCEDURE TEST_MY_NEW_PROCE
    AS
    BEGIN
    REMOVE FROM EMPLOYEE_TABLE
    WHERE EMPLOPYEE_ID LIKE '% P ';
    COMMIT;
    END;
    /

    The procedure works well in the target database.

    Now, before the execution of my interface, I want to run this procedure in my package. So can some please help me how to call this oracle (creation in target schema) ODI procedure and run it.

    Thank you.

    Hi, GRK,.

    You can create an ODI procedure, add one step, choose Oracle as technology and your target schema.
    Then just call it through a pl/sql block:

    BEGIN
     TEST_MY_NEW_PROCE;
    END;
    

    In your package, then drag this ODI procedure.

    Kind regards
    JeromeFr

  • How to call Oracle E-Business seeded program in SOA BPEL 11 g

    Hello

    I implement a point between third party system and Oracle inventory interface. My composite will treat the data element of the third party system and insert the data into the interface table (mtl_system_items_interface).

    Once integration is complete, I need BPEL call the program seeded (import items - INCOIN) to insert data from one table of interface in the base Oracle tables; in other words, mtl_system_items_interface to mtl_system_items_b.

    I tried using an adapter "Oracle Applications" but cannot place the INCOIN program. There's no options to find the INCOIN program either location.

    Someone knows how to call an Oracle planted a BPEL process program?

    Appreciate your help :)

    Hoang

    Hoang,

    You won't find the INCOIN in the Oracle Apps adapter. INCOIN is a simultaneous running of the Oracle Application program.
    The program INCOIN can be the call of the function: Fnd_Request.submit_request. To run this function, you have to sign the global settings (FND_GLOBAL. APPS_INITIALIZE) and have a validation in the end.
    I suggest you use the DB adapter to call a customization procedure where you can have all of these features inside.

    Arik

Maybe you are looking for