How to get updated value at run time in oracle forms

How to get updated value form oracle database on a field in oracle forms 6.0 at run time if the same form is opened by multiple users and both have get the same maximum value if one commit the record then how other would get that maximum value with out exiting that form...

This issue is fairly common and Forms handles the situation by displaying the error, "Record has been updated by another user. Requery to see changes." if a user tries to update a record that was updated by another user.
If your data is in a base table block, you can check before you save by checking the value in the form against the database using the Get_Item_Property('<BLOCK.ITEM>',DATABASE_VALUE). You can compare the value returned by the built-in against the value in the field to see if they have changed. This could be a lot of work and a lot of network traffic if you are checking numerous items in your data block. Forms has a standard locking mechanism that will lock the queried record as soon as a user makes any changes. If another user queries and attempts to change the record locked by another user - they will receive a "Record Locked" message.
Francois brings up a valid point. Perhaps you should review the link Francios provided as well as this one: How to ask questions the smart way
It is always a good idea to review your thread before you post it and ask yourself, "Could I answer this question given the information I've provided and the way I've asked the question?"
Hope this helps,
Craig B-)
If someone's response is helpful or correct, please mark it accordingly.

Similar Messages

  • How to get updated values from the loops while they are running

    Hello,
            I am having difficulty solving a very basic problem, how to access the updated values from the 'FOR loop' while its running?  Basically, the VI  I am currently working on calls two sub VIs. Each sub VI has a for loop, and both VIs may or may not run for same number of iterations. My goal is to read the values at each terminal inside the loop of both sub VIs, in the Main VI. I tried to achieve it using Global Variables, but in main VI it displays only the last iteration value from both sub VIs. Could anyone please tell me whrere am I going wrong? Is there any other/better way to achieve this.
    I appreciate any input on this issue.  
    Kudos are (always) welcome for the good post. :-)
    Solved!
    Go to Solution.

    Dennis,
                In attached VI, I can see the values changing in the sub VI from the main VI with the numeric indicator whose reference is passed on to the sub VI. Now if I wanted to store or use those values how do I do that? I tried to chnge the indicator to control and read from it (in the attached VI) , but the the indicator updates only once. Tried to create a property node and read the Value from it and it didn't work either.
    Thanks in Advance!
    -Nilesh
    Kudos are (always) welcome for the good post. :-)
    Attachments:
    main-1.vi ‏8 KB
    sub-1.vi ‏9 KB

  • How to get sequence name in run time.

    hi
    I have several sub sequence called in the main sequence in TestStand. Those sub sequences have different sequence names, which i wanted to display by string indicator on the Labview Operator Interface. Is there a simple way to show the current calling sub sequence name during run time(run main).
    thanks.
    Message Edited by Appledoll on 07-12-2007 10:12 AM

    Hi,
    The easiest way is to use the NameOf() function. In this case where you wish to get the name of the current sequence the syntax NameOf(RunState.Sequence) yields the name. I attach a very simple example also.
    Getting the Name of Any TestStand Property Programmatically in TestStand
    Hope this helps
    Pelle S
    District Sales Manager
    National Instruments Sweden
    Attachments:
    Get sequence name.vi ‏15 KB

  • How to generate database text items at run time in oracle forms 6i?

    i have a text item with NUMBER OF ITEMS DISPLAYED=3. My requirement is, i need to generate text items at run time under each TEXT ITEM(3 text items will be there since number of items displayed is 3) and the values will be stored in the database based on the primary key combination. pls help me to solve this pblm

    Hi,
    You cannot generate items dynamically at runtime. The only thing you can do is show and hide item on time. Thay seems that they are generated at run time. Second thing you can do is that you can put items on stack canvas and set visible property of stack canvas to no and at run time set it to visible according to ur condition. Otherwise there is no way. If you find any other way, plz do inform here also.

  • How to auto-generate a "empno" field at run time in oracle forms 6i

    Hello!
    I have connected to a SCOTT schema. And i am using emp table. At run time mode when i press F8 then the data is displayed in the fields.
    My task is to generate auto "empno" as soon as i run the form. Kindly do the needful.
    Thanks in advance

    Hi Francios,
    I think with your solution our user only able to see the current information in the form.I donot think it will auto generate the empno.
    Dear user,
    I suggest what you can do is to create one sequence in your database and use it to generate automatic
    empno.
    In post query trigger try to implement the idea.
    Suppose in the name of the sequence is empno_seq.
    if emp.empno is null then
    :emp.empno := empno_seq+1;
    end if;
    Try i hope it will work
    Regards
    Rajat

  • How to read a Value from Excel Cell into Oracle Forms 10g with Java

    Did any one Implamented a Java PJC to integrate Excel on Oracle Forms 10g?
    I Open Excel Applikation.
    Open a File like c:\import_test.xls
    read a number 05 from A:1 (i get it as return value).
    Save a number in a variable in Forms 10g
    Can any one help my please?
    Thanks

    why don't you use webutil.
    it has package client_ole2 which allows you to have programmatic interface with excel application.
    this is especially useful if the excel to be read is available in the client.

  • Create lov at run time in  oracle form 10g

    i want to create a lov and record group dynamically at run time..
    i have the code in when-form-instance..
    Declare
    v_lov lov;
    rg_id recordgroup;
    gc_id groupcolumn;
    tem_num number;
    v_rg_id number;
    begin
    rg_id := find_group('My group');
    if id_null(rg_id) then
    rg_id := Create_group('My_group');
    gc_id := add_group_column(rg_id,'emp_id',number_column);
    gc_id := add_group_column(rg_id,'ename',char_column,15);
    end if;
    v_rg_id := POPULATE_GROUP_WITH_QUERY('My_group','select t.employee_id,t.first_name from employee_mt t where t.employee_id in (103,104,106)');
    --tem_num :=populate_group(rg_id);
    v_lov := find_lov ('LOV_NAME');
    set_lov_property(v_lov,group_name,'My_group');
    set_item_property('VEH_SEARCH.TXT_VEH_CODE',lov_name,'lov');
    End;
    now i have problem...whether i create first a lov and record group at design time or not????
    if i create a lov and have the recordgroup column then what is the benefit of dynamically lov...???
    thanks

    Hi.
    It is possible with some restrictions. Let's say you agree there are max 5 columns in your LOV-s. That way you can easily create LOV to RG colums mapping (what Andreas pointed out).
    For example :
    1. in design time create RG with dummy columns (for example : c1, c2, c3, c4, c5)
    2. in design time create 1 LOV with 5 predefind columns (for example : c1, c2, c3, c4, c5)
    3. populate that record group with select (selecting 5 columns. If you do not have 5 columns in your table on which LOV is based just select dummy columns for the rest of the columns) aliasing them as c1, c2, c3, c4, c5 (same as in LOV from step 2)
    4. asign that RG to the LOV in step 1
    5. in LOV show just "non-dummy" rows form step 3
    The rest you already figured it out.
    The benefit of this approach is questionable as the same can be done creating more RG and LOV-s in design time. So I believe this is the matter of developer preferences. By the way the concept I described we use on daily bases dealing with LOV-s.
    Best regards.

  • How to get updated by count value in database ?

    hi all,
    I created jsp page iin which insert,update,delete , query and queryall Functionalities are working...
    I need following,
    whenever i update a record i should get updated by, updated time and updated count.. to be stored in database...
    i achieved to store updated by and updated time...
    please help me how to get updated count:
    when ever a record is updated for first time updated count=1,
    for second time it should be 2 for third time it should be 3 and so onnnn
    please help me how to write this kind of function and kind of code help will be appriciated....

    if you want "number of updates" performed on each row to be persistive, you should have designed the schema with an extra field which keeps number of updates performed.
    to generic solution sql statement should have been written like
    INSERT INTO table (a,b,c,update_count) VALUES (1,2,3,4)
      ON DUPLICATE KEY UPDATE update_count=update_count+1;in this case even a insert statement will work, you wouldn't had to write another update statement.
    or if u want to use update statement only
    have an extra column "update_count" do "update_count=update_count+1" on each update statement, set initial default value to 0;
    and if u want to know how many rows have been updated
    as BalusC wrote
    BalusC wrote:
    PreparedStatement#executeUpdate() returns an int which represents the amount of affected rows.

  • How to get updated table values from objectlistdataproviders

    how to get updated table values from objectlistdataproviders

    Hi,
    Here is a sample code
    start-of-selection.
    *Select the data you need into an internal table
      loop at it_mara into wa_mara.
    data that needs to be displayed in the output list
        write:/ box as checkbox,
                wa_mara-matnr under text-001,
                wa_mara-maktx under text-002,
                wa_mara-lgort under text-003.
    Hide the data that needs to moved to internal table
        hide:wa_mara-matnr, wa_mara-maktx, wa_mara-lgort.
      endloop.
      clear wa_mara.
    end-of-selection.
      lines = sy-linno.
    at line-selection.
      clear:it_matnr. 
      do lines times.
        check sy-index > 1.
        box = space.
        read line sy-index field value box.
        if box = 'X'.
    *data selected using check box is moved to internal table
          append wa_mara to it_matnr.
        endif.
      enddo.
    Regards,
    Jisha.

  • MIGO( (good receipt,Transfer pos how to  to get serial number  at run time

    Hi Experrts:-
    I need to change the status of serial number (equipment number ) during Migo (good receipt,Transfer posting).
    I have checked all the user exits and number of badis but i am not getting serial number at run time if i get serial numbar
    in exit od badi i will change the status
    I have used  following badi:-
    MB_DOCUMENT_BADI
    MB_MIGO_ITEM_BAdI
    Thanks

    Hi Dilip,
    If I am correct you are taking about changing user Status at device level (serial number)
    you can set the user status through status profile (Tcode OIBS for particular status profile).
    within this, you can also set/ change the status, if particular business transaction is executed (for e.g. good receipt, Stock transfer)
    Please check if you are using status profile in your case, if not create one, by this way i think you can able to map the requirement.
    Regards,
    Chetan

  • How to pass column name at run time in function.

    how to pass column name at run time in function as parameter.
    thank in advance
    pramod patel

    Hello,
    Using dynamic sql you can pass column name to function. well I am not getting what you really want to do ? Please write in more detail. By the way I am providing one example here. see it uses dynamic sql.
    Create or replace function fun_updtest (p_columnname_varchar2 in varchar2,
    p_value_number in number)
    return number is
    v_stmt varchar2(500);
    begin
    v_stmt := 'update emp
    set '||p_columnname_varchar2||' = '||to_char(p_value_number)||'
              where empno = 7369';
    execute immediate v_stmt;
    return 0;
    commit;
    end;
    call to this function can be like this..
    declare
    v_number               number;
    begin
    v_number := fun_updtest('SAL',5000);
    end;
    Adinath Kamode

  • How to get each value from a parameter passed like this '(25,23,35,1)'

    Hi
    One of the parameter passed to the function is
    FUNCTION f_main_facility(pi_flag_codes VARCHAR2) return gc_result_set AS
    pi_flag_codes will be passed a value in this way '(25,23,35,1)'
    How to get each value from the string
    like 25 first time
    23 second time
    35 third time
    1 fourth time
    I need to build a select query with each value as shown below:-
    (SELECT t2.org_id, t4.description
    from org_name t2, ref_org_name t3, code_table t4
    where t2.att_data = t4.code
    and t3.ref_code = t2.att_type
    and t2.att_type = 25 and t3.code_type = t4.code_type
    and to_date('01-JAN-10', 'DD-MON-YY') between t2.att_start_date AND t2.att_end_date) q1,
    (SELECT t2.org_id, t4.description
    from org_name t2, ref_org_name t3,code_table t4
    where t2.att_data = t4.code
    and t3.ref_code = t2.att_type
    and t2.att_type = 23 and t3.code_type = t4.code_type
    and to_date('01-JAN-10', 'DD-MON-YY') between t2.att_start_date AND t2.att_end_date) q2,
    (SELECT t2.org_id, RTRIM(xmlagg(xmlelement(e, t4.description || ';')
    ORDER BY t4.description).EXTRACT('//text()'), ';') AS DESCRIPTION
    from org_name t2, ref_org_name t3,code_table t4
    where t2.att_data = t4.code
    and t3.ref_code = t2.att_type
    and t2.att_type = 35 and t3.code_type = t4.code_type
    and to_date('01-JAN-10', 'DD-MON-YY') between t2.att_start_date AND t2.att_end_date
    group by t2.org_id) q3,
    (SELECT t2.org_id, t4.description
    from org_name t2, ref_org_name t3, code_table t4
    where t2.att_data = t4.code
    and t3.ref_code = t2.att_type
    and t2.att_type = 1 and t3.code_type = t4.code_type
    and to_date('01-JAN-10', 'DD-MON-YY') between t2.att_start_date AND t2.att_end_date) q4
    Please help me with extracting each alue from the parm '(25,23,35,1)' for the above purpose. Thank You.

    chris227 wrote:
    I would propose the usage of regexp for readibiliy purposes and only in the case if this doesnt perform well, look at solutions using substr etc.
    select
    regexp_substr( '(25,23,35,1)', '\d+', 1, 1) s1
    ,regexp_substr( '(25,23,35,1)', '\d+', 1, 2) s2
    ,regexp_substr( '(25,23,35,1)', '\d+', 1, 3) s3
    ,regexp_substr( '(25,23,35,1)', '\d+', 1, 4) s4
    from dual 
    S1     S2     S3     S4
    "25"     "23"     "35"     "1"In pl/sql you do something like l_val:= regexp_substr( '(25,23,35,1)', '\d+', 1, 1);
    If t2.att_type is type of number you will do:
    t2.att_type= to_number(regexp_substr( '(25,23,35,1)', '\d+', 1, 1))Edited by: chris227 on 01.03.2013 08:00Sir,
    I am using oracle 10g.
    In the process of getting each number from the parm '(25,23,35,1)' , I also need the position of the number
    say 25 is at 1 position.
    23 is at 2
    35 is at 3
    1 is at 4.
    the reason I need that is when I build seperate select for each value, I need to add the query number at the end of the select query.
    Please see the code I wrote for it, But the select query is having error:-
    BEGIN
    IF(pi_flag_codes IS NOT NULL) THEN
    SELECT length(V_CNT) - length(replace(V_CNT,',','')) FROM+ ----> the compiler gives an error for this select query : PLS-00428:
    *(SELECT '(25,23,35,1)' V_CNT  FROM dual);*
    DBMS_OUTPUT.PUT_LINE(V_CNT);
    -- V_CNT := 3;
    FOR L_CNT IN 0..V_CNT LOOP
    if L_CNT=0 then
    V_S_POS:=1;
    V_E_POS:=instr(pi_flag_codes, ',', 1, 1)-1;
    else
    V_S_POS:=instr(pi_flag_codes,',',1,L_CNT)+1;
    V_E_POS:=instr(pi_flag_codes, ',', 1, L_CNT+1)-V_S_POS;
    end if;
    if L_CNT=V_CNT then
    V_ID:=TO_NUMBER(substr(pi_flag_codes,V_S_POS));
    else
    V_ID:=TO_NUMBER(substr(pi_flag_codes,V_S_POS,V_E_POS));
    end if;
    VN_ATYPE := ' t2.att_type = ' || V_ID;
    rec_count := rec_count +1;
    query_no := 'Q' || rec_count;
    Pls help me with fetching each value to build the where cond of the select query along with the query number.
    Thank You.

  • How to get real value from selectOneChoice with javascript?

    Hi,
    How to get real value from selectOneChoice with javascript? The event.getNewValue() only gets me the index of the selected item, not the value/title.
    JSF page:
    <af:resource type="javascript">
    function parseAddress(event)
    alert("new value: " + event.getNewValue());
    </af:resource>
    <af:selectOneChoice label="Location:" value="" id="soc4">
    <af:clientListener type="valueChange" method="parseAddress" />
    <f:selectItems value="#{Person.locations}" id="si7"/>
    </af:selectOneChoice>
    HTML :
    <option title="225 Broadway, New York, NY-10007" selected="" value="0">225 Broadway (Central Office)</option>
    <option title="90 Mark St., New York, NY-10007" value="1">90 Mark St. (Central Office)</option>
    Thanks a lot.

    Something I was missing ,
    You need to add valuePassThru="true" in your <af:selectOneChoice component. I have personally tested it and got the actual value in alert box. I hope this time you got the real solution. You can also test the following code by your end.
    <?xml version='1.0' encoding='UTF-8'?>
    <jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.1"
    xmlns:f="http://java.sun.com/jsf/core"
    xmlns:h="http://java.sun.com/jsf/html"
    xmlns:af="http://xmlns.oracle.com/adf/faces/rich">
    <jsp:directive.page contentType="text/html;charset=UTF-8"/>
    <f:view>
    <af:document id="d1">
    <af:form id="f1">
    <af:panelBox text="PanelBox1" id="pb1">
    <af:selectOneChoice label="Set Log Level" id="soc1"
    value="#{SelectManagedBean.loggerDefault}"
    valuePassThru="true">
    <af:selectItem label="select one" value="First" id="s6"/>
    <af:selectItem label="select two" value="Second" id="s56"/>
    <af:clientListener method="setLogLevel" type="valueChange"/>
    </af:selectOneChoice>
    <af:resource type="javascript">
    function setLogLevel(evt) {
    var selectOneChoice = evt.getSource();
    var logLevel = selectOneChoice.getSubmittedValue();
    // var logLevelObject = AdfLogger.NONE;
    alert("new value is : " + logLevel);
    //alert(evt.getSelection);
    //alert(logLevelObject);
    evt.cancel();
    </af:resource>
    </af:panelBox>
    </af:form>
    </af:document>
    </f:view>
    </jsp:root>

  • How to get return value from Java runtime.getRuntime.exec?

    I'm running shell commands from an Oracle db (11gr2) on aix.
    But, I would like to get a return value from a shell comand... like you get with "echo $?"
    I use a code like
    CREATE OR REPLACE JAVA SOURCE NAMED common."Host" AS
    import java.io.*;
    public class Host {
      public static int executeCommand(String command) {
        int retval=0;
        try {
            String[] finalCommand;
            finalCommand = new String[3];
            finalCommand[0] = "/bin/sh";
            finalCommand[1] = "-c";
            finalCommand[2] = command;
          final Process pr = Runtime.getRuntime().exec(finalCommand);
          pr.waitFor();
       catch (Exception ex) {
          System.out.println(ex.getLocalizedMessage());
          retval=-1;
        return retval;
    /but I do not get a return value... because I don't know how to get return value..
    Edited by: user9158455 on 22-Sep-2010 07:33

    Hi,
    Have your tried pr.exitValue() ?
    I think you also need a finally block that destroys the subprocess
    Regards
    Peter

  • How to get  the values of bdcmsgcoll to be printed in report

    hi experts,
    I am updating Va02 using BDc .. this is done however  i m struck at this point..
    I want to display the log i.e  messages  like data was updated ,, or any error ...
    As far as i know these logs are stored in BDcmsgcoll but how to get these value to be
    displayed in report once the update is done ..
    please help..if any body has any code .. then do send it to me.
    Thanks in Advance
    Srinivas

    Srinivas,
    data: messtab type table of BDCMSGCOLL with header line.
    Call transaction 'SM50' using bdcdata
                                  mode 'N'
                                  <b>messages in messtab</b>.
    Loop at messtab .
      write : messtab
    endloop.
    Pls. reward if useful

Maybe you are looking for

  • Itunes 11 has extreme trouble syncing my ipod

    It will sync like 4 songs within a 10 minute time frame then say an unknown error has occured (-50). How can i get it to cually update my ipod

  • Using "XML Document from XML Schema" in JDeveloper

    Hi Experts, I have a requirement to generate XML Document from XML Schema. For this I have used "XML Document from XML Schema" feature in JDeveloper. It is found in File->New->General->XML Document form XML Schema. I have registered a schema with jde

  • Include a .jsff in another .jsff

    Hi, I am trying to include a .jsff within another .jsff page in jdev 11.1.1.2 as a simple region. The jdev allows me to include the same as a region/dynamic region when I drag and drop the second .jsff file in the first .jsff file. But when i try to

  • Extensions nightmare solved

    I kept getting "The installer file is invalid The extension manager will not be installed." error message when trying to install DW extensions. This was despite installing through DW, double clicking MXP files, deleting cache files, deleting other us

  • Do we have Jinitiator 1.1.8.19 version in 64 bit. Urgent please. regards.

    Hi I have requirement to install Jinitiator 1.1.8.19 in 64bit machine. Is this version available in 64bit. regards.