Unable to update record in web Form

Hi, i am unable to update record in a form. I am building a custom form using forms 6i and putting it on the web in oracle applications 11.5.9
I used template.fmb as a starting point for my form. I have one datablock based on a table. Insert, update and delete properties are set to yes on the property pallete of data block. The table against which i am running the form has a primary key which is a combination of two fields. I am able to update a record with pure SQL running against the table.
My form now brings back a record from the db like it should but whenever I try to update that record either by pressing Action Save or by clicking button that has update statement in it, instead of doing an update, it does an insert and tells me that this record already exists and that i entered value(s) that must be unique for each record. It thinks I want to insert but I want to update. What am i doing wrong???
Update allowed value is set to Yes in all the items in the data block and at the data block level as well. Querly_only is set to no.
What's even more frustratinng is that I've ran the form manually before starting with template.fmb and have been able to update the table but when I put it on the web and used template.fmb it stopped working!
I am very new to forms, can anybody suggest anything? Please help!!!

When you populate the 2nd block with a select into query, it's the same as just typing the data into the block. The record is treated as one needing to be inserted, not as one that is queried.
To populate it using a true query, but with data from the LOV, you can do this:
Programmatically set the default_where clause of the block based on the LOV. For example, if a name is chosen from the LOV in an item called LOV1, you could do:
set_block_property('block2','default_where','name='''||:block1.lov1||'''');
or if the LOV is a number, like a department number:
set_block_property('block2','default_where','deptno='||:block1.lov1);
The tricky part when you build your where clause is that you must surround strings with single quotes, and the way to do this is to use two single quotes to represent an actual single quote in the where clause. Otherwise a single quote is interpreted as part of the PL/SQL syntax.
Then, just navigate to block 2 and execute a query:
go_block('block2');
do_key('execute_query');
I hope this works for you. I didn't have time to test this, so I hope I didn't make any syntax errors when typing.

Similar Messages

  • Updating data in Web Forms

    Hi,
    I would like to know if it's possible to update data in web forms :
    * periodically (every 10 seconds for examples)
    * from the server (in a trigger or something like that) for all clients connected
    Thanks

    Taz,
    for the first a timer could do that. The second is not possible without having asynchrous message support in Forms. There are plans for such a feature but its not yet implemented
    Frank

  • FRM-40509: ORACLE error: unable to UPDATE record.

    FRM-40509: ORACLE error: unable to UPDATE record.
    what can i do?

    There will always be another error which tells you what the actual problem on the database is. Use the Display message key, or message out DBMS_ERROR_TEXT

  • How to update MD in Web-Form

    Hello, gurus!
    Does anybody know it is possible to update master data in web-form?
    I mean, in web-form there is a function which changes texts in characteristic, and I want to update these texts in analysis item in the same form. The only solution I found was reentering in this form. It is very inconvenient.
    May be some magic spells exist to refresh MD directly in form?

    Hi Pavan,
    I am getting PDF form properly in browser with no values in the fields as it should be. And i have provided one User entered field, When user enters sales order number in that field and presses the submit to sap button other fields rerlated with sales order status information should be displayed with the values related with that sales order number. But after pressing Submit to SAP button i didnt get values in other fields.
    Method for Submit to SAP button is also called properly. Even i can see the status information in fields outside the PDF form in Browser.
    So, parheps i think that whenever PDF form loads first time in browser, at that time it shows the values in the context variable. But after first load nothing is changed in that PDF form evenif the context values are changed.
    Is it true?
    Regards,
    Bhavik

  • Unable to Update Collection from Tabular Form

    I have built several Tabular Forms where I have updated the apex_collection with the data entered into the form. Then I loop thru the collection and update the database.
    I now Copy a working form to create a new form using data from a different table. All I am doing is changing the underly apec_collection with a different select statement and give it a new collection name. The number of columns on the tabular form are the same as the working form.
    Now I run the form and I get ORA-01403: no data found Error UNABLE to UPDATE ROWS
    It is acting like it is not finding any data from the collection. But I put in the same selection critera for the update into a report below the tabular form and I see data just fine.
    Here is the code I am using to update the collection when the SAVE button is pressed (Process on Submit before Calculations).
    begin
    for c1 in (
    select seq_id from apex_collections
    where collection_name = 'IPR_MATRIX' and c001 = :P21_FACILITY
    and c002 = :P21_DEPT
    order by seq_id) loop
    c := c+1;
    apex_collection.update_member_attribute (p_collection_name=> 'IPR_MATRIX',
    p_seq=> c1.seq_id,p_attr_number =>5,p_attr_value=>wwv_flow.g_f01(c));
    apex_collection.update_member_attribute (p_collection_name=> 'IPR_MATRIX',
    p_seq=> c1.seq_id,p_attr_number =>6,p_attr_value=>wwv_flow.g_f02(c));
    apex_collection.update_member_attribute (p_collection_name=> 'IPR_MATRIX',
    p_seq=> c1.seq_id,p_attr_number =>7,p_attr_value=>wwv_flow.g_f03(c));
    apex_collection.update_member_attribute (p_collection_name=> 'IPR_MATRIX',
    p_seq=> c1.seq_id,p_attr_number =>8,p_attr_value=>wwv_flow.g_f04(c));
    apex_collection.update_member_attribute (p_collection_name=> 'IPR_MATRIX',
    p_seq=> c1.seq_id,p_attr_number =>9,p_attr_value=>wwv_flow.g_f05(c));
    apex_collection.update_member_attribute (p_collection_name=> 'IPR_MATRIX',
    p_seq=> c1.seq_id,p_attr_number =>10,p_attr_value=>wwv_flow.g_f06(c));
    apex_collection.update_member_attribute (p_collection_name=> 'IPR_MATRIX',
    p_seq=> c1.seq_id,p_attr_number =>11,p_attr_value=>wwv_flow.g_f07(c));
    apex_collection.update_member_attribute (p_collection_name=> 'IPR_MATRIX',
    p_seq=> c1.seq_id,p_attr_number =>12,p_attr_value=>wwv_flow.g_f08(c));
    apex_collection.update_member_attribute (p_collection_name=> 'IPR_MATRIX',
    p_seq=> c1.seq_id,p_attr_number =>13,p_attr_value=>wwv_flow.g_f09(c));
    apex_collection.update_member_attribute (p_collection_name=> 'IPR_MATRIX',
    p_seq=> c1.seq_id,p_attr_number =>14,p_attr_value=>wwv_flow.g_f10(c));
    apex_collection.update_member_attribute (p_collection_name=> 'IPR_MATRIX',
    p_seq=> c1.seq_id,p_attr_number =>15,p_attr_value=>wwv_flow.g_f11(c));
    apex_collection.update_member_attribute (p_collection_name=> 'IPR_MATRIX',
    p_seq=> c1.seq_id,p_attr_number =>16,p_attr_value=>wwv_flow.g_f12(c));
    end loop;
    end;
    Any Ideas what I am doing wrong?

    c is set to 0
    It looks like I may have found my problem.
    There tabular form is limited by a where clause in the report to a subset of the collection. Making the collection match the same where clause seems to have fixed my problem.
    Not clear on why that works like that but it looks like I may have it working.

  • Need a process to update BSO Planning Web form into an ASO Cube

    Need a process to update information from the BSO Planning Web form into an ASO Report Cube every (5) five minutes.
    Please advise

    Thanks here is Part 2 of my questions
    Details:
    User Input data into a web form for Intersection are the following:
    Dim1,Dim2,Dim3,Dim4 , Account AAAA, 1000
    Dim1,Dim2,Dim3,Dim4 , Account BBBB, 2000
    Dim1,Dim2,Dim3,Dim4 , Account TTTT, 4000
    Dim1,Dim2,Dim3,Dim4 , Account ZZZZ, 7000
    Design Question:
    In the ASO Reporting Cube
    AAAA and BBBB are both at level 0 in both cube
    TTTT and ZZZZ are being loaded to a parent which is Level 1
    MY Issue with the Design Question  ???
    ASO Cubes can only be load at a level 0.
    So how can I complete this task, what are my option:
    My thinking process is the XRef Calc Script could push data the cube, than by built a maxl scripts that  would run the Calc script and put this scripts into some kind of system scheduler running the Maxl Scripts Every  (5) Mintues
    or am i way off base here ????
    Please advise
    Thanks in Advance

  • DataProvider unable to update records in table

    Hi guys,
    as above, I have got this piece of code below.
    What happen is I am unable to update the records in one of the dataprovider - "objectidsDataProvider" (used to keep track of no. of items in itemsDataProvider).
    If I take away the objectidsDataProvider coding; I am able to update the itemsDataProvider.
    Please kindly advice and let me know if any additional info needed. Thanks in advance.
    CODE:
    int newItemId = 0;
    if (itemsDataProvider.canAppendRow()) {
      try {
        RowKey rowKey = itemsDataProvider.appendRow();
        itemsDataProvider.setCursorRow(rowKey);
        // put the new data in the data provider
        itemsDataProvider.setValue("ITEMS.ID", new Integer(0));
        itemsDataProvider.setValue("ITEMS.USERNAME", uname);
        itemsDataProvider.setValue("ITEMS.TITLE", title);
        newItemId = ((Integer)objectidsDataProvider.getValue("MAXITEMID")).intValue();
        objectidsDataProvider.setValue("OBJECTIDS.ID", new Integer(newItemId));
         objectidsDataProvider.commitChanges();
        // Navigate through rows with data provider
        if (itemsDataProvider.getRowCount() > 0) {
          itemsDataProvider.cursorFirst();
          do {
            if (itemsDataProvider.getValue("ITEMS.ID").equals(new Integer(0))) {
              itemsDataProvider.setValue("ITEMS.ID", new Integer(newItemId));   
          } while (itemsDataProvider.cursorNext());
        itemsDataProvider.commitChanges();
      } catch (Exception e) {
        log("Cannot add new DVD", e);
        error("Cannot add new DVD: " + e.getMessage());
      return "success";
    } else {
      return "fail";
    SELECT * FROM DVD.OBJECTIDS
    TABLE_NAME        ID
    items            28
    SELECT * FROM DVD.ITEMS
    ID    USERNAME    TITLE
    1        John        300
    ...

    RowKey rowKey = itemsDataProvider.appendRow();
    itemsDataProvider.setCursorRow(rowKey);
    // put the new data in the data provider
    itemsDataProvider.setValue("ITEMS.ID", new Integer(0));
    itemsDataProvider.setValue("ITEMS.USERNAME", uname);
    itemsDataProvider.setValue("ITEMS.TITLE", title);try to use this :
    RowKey rowKey = itemsDataProvider.appendRow();
        itemsDataProvider.setCursorRow(rowKey);
        // put the new data in the data provider
        itemsDataProvider.setValue("ITEMS.ID", rowKey ,new Integer(0));
        itemsDataProvider.setValue("ITEMS.USERNAME", rowKey ,uname);
        itemsDataProvider.setValue("ITEMS.TITLE",rowKey , title);and dont forget to end ur code with ,,, commiteChanges();
    Hope this will help
    Good luck
    Mohammed

  • Update Access to Web forms in Planning

    We have issues in all of our Planning applications, all databases on both production and development. We have had the applications in administrator mod since September. We are ready to start testing to prepare for this year's budget cycle. I created a test native user, and granted the appropriate access in Planning and refreshed the security filters. The web form is coming up read only. I looked at the filter in Essbase, and it shows as read access even though Planning has write access. I ran the Planning Access Report through Shared Services, and it shows write access to all of the dimensions to which we have security applied. According to an Oracle analyst who is working on my service request, it is normal for these to go to Essbase as read access, but the user should still be able to update data.
    Since we closed the budget cycle in September, no changes to dimension security have been made, so I'm not sure why the access dropped. We tested with an existing account and had the same issue. We are on version 9.3.1. We recently applied patch 9.3.1.1.9. We did not test the web forms after applying this patch. I'm not sure if this could be causing the issues.
    Has anyone ever experienced this problem, or have any suggestions?

    Hi,
    I faced some issue similar to this in past with version 9.2, As iam updating security on planning and it works fine for data forms when i perform security refresh.
    but when user access those from excel the filters doesn't get update on EAS filters. after two hours investigation even though i update some filters on planning
    side after security refresh it doesn't get affected on essbase filters. the reason when security refresh is done the filters getting in to cache memory and doing nothing on essbase, so work around is to delete one particular filter on essbase and then perform security refresh so that it gets updated.
    Let me know if this is helpful and works.
    Thanks,
    Red

  • I am unable to use my client' web forms that are required for my job. It's a pdf that can be filled out and submitted within a web page. new firefox will only download and open as a regular pdf. NOT OK! HELP!!

    I need to find out how to make these pdf web forms work again!! I have to use IE now and I HATE IE. Please don't prove me wrong after I've been telling people how amazing firefox is for years. I can no longer do my job with your browser

    https://support.mozilla.com/en-US/kb/Using+the+Adobe+Reader+plugin+with+Firefox
    https://support.mozilla.com/en-US/kb/Opening+PDF+files+within+Firefox

  • Unable to update records in table

    Hi all,
    While updating particular set of records in a table system gets hanged however it is allowing to update rest of record.i checked lock using
    v$locked_object ,v$session but i cud't find any..is there any way to find lock at all levels.
    thanks

    Grab your sid of the session that you are running via sys_context('USERENV','SID') or something else and then check out the wait events, and locks:
    select * from gv$lock where sid = <sid>;
    select * from gv$session_wait where sid = <sid>;P.S. Watch for triggers... YUCK!
    Message was edited by:
    JoeC

  • Unable to update records in Plan

    Hi
    I am trying the example oracle bam integration with Oracle AQ/Database
    As while updating myplan in design studio I am not getting any error but data also not inserted in my grid.
    when I hit update after 2 mins its displaying updated(2 min 33 seconds, 0 records).
    could anyone help me out with this issue?
    Regards,
    Ana
    Edited by: user10181991 on Dec 16, 2008 3:22 AM

    Grab your sid of the session that you are running via sys_context('USERENV','SID') or something else and then check out the wait events, and locks:
    select * from gv$lock where sid = <sid>;
    select * from gv$session_wait where sid = <sid>;P.S. Watch for triggers... YUCK!
    Message was edited by:
    JoeC

  • LSMW (PA40) successful but unable to update records in PA30

    Hi,
    I have tried running LSMW ( with external no range) in Fore ground mode. I can see that the data is getting properly picked from Excel sheet and in foreground mode, I am able to see this data getting into screens when i run LSMW last step.
    But actually when i go and check in tables and in PA30 if these employees are hired, there is no data.
    Can you please check the below --->
    My guess is while recording when we save 0,1,2 there should be some code written for "SAVE". In my recording BDC Code i ddint find any specific code. Can you check in your recordings if there is any special code for "SAVE" like BDC_OKCODE = "SAVE".
    Since there is no code written in my recording, i think this is the reason data is not getting saved.
    Can you let me know what needs to be done? If the above doubt is right, how to insert that in my BDC code.
    For your information-> U can find my BDC code pasted here.
    Recording REC7 M7
    PA40 Personnel Actions
    SAPMP50A 2000
    BDC_CURSOR T529T-MNTXT(01)
    BDC_OKCODE =PICK
    RP50G-PERNR PERNR Personnel Number
    RP50G-EINDA EINDA Entry Date
    RP50G-SELEC(01) X SELEC_01 Indicator for list sc
    BDC_SUBSCR /1PAPAXX/HDR_30060A
    MP000000 2000
    BDC_CURSOR PSPAR-PERSK
    BDC_OKCODE =UPD
    P0000-MASSN MASSN Action Type
    PSPAR-WERKS WERKS Personnel Area
    PSPAR-PERSG PERSG Employee Group
    PSPAR-PERSK PERSK Employee Subgroup
    MP000200 2010
    BDC_CURSOR Q0002-GESC1
    BDC_OKCODE =UPD
    Q0002-ANREX ANREX Form of address text
    P0002-NACHN NACHN Last Name
    P0002-VORNA VORNA First Name
    Q0002-PERID PERID Personnel ID Number
    P0002-GBDAT GBDAT Date of Birth
    Q0002-GESC1 GESC1 Gender key
    Q0002-GESC3 GESC3 Gender key
    BDC_SUBSCR SAPMP50A
    Thanks & Regards,
    Mamta
    Edited by: Mamta on Oct 28, 2008 7:58 PM
    Edited by: Mamta on Oct 28, 2008 7:59 PM

    Dear All,
    First of all I would like to answer all your questions.
    1. Yes, I tried LSMW by including PSPAR-PERNR PERNR Personnel Number in BDC code under MP000000 2000 too. Also, I did add the Perner again in the upload file too. In Read data mode I can see that Perner appeared twice as per our recording. In convert data Perner appeared only one. When I run last step of LSMW in foreground mode everything was perfect. But again when I go and check in PA30 there is no data.
    2. Yes, I did use PA40 for recording.
    3.  The sequence is 0000->0002->0001 while recording , in uploading file and in foreground mode too.
    4. When I run in foreground it appears like the regular Manual PA40 transaction.
    I donu2019t what might be causing this error. I would be glad to know your answers for the above issue.

  • Error in updating records brought by LOV

    Hi everybody
    I am using Oracle 10 g
    when fetching data from the database by choosing a specific record from LOV then trying to make "save" means "commit" I have this error
    FRM-40509: Oracle error: unable to update record
    I think there is a problem in mapping btw the record in the form and the cursor pointing to that record in the database because when i execute "next_recod" button after choosing one in LOV it go to the record next the one specified before choosing from LOV
    knowing that updating process working correctly when choosing by ("first_record, previous_record, next_record or last_record)
    so what is the solution
    please help
    thank you very much

    yes please
    I didn't know what do you mean by customized or default menu
    I build LOV using the wizard and bind it by a query to a table then make Show_LOV from the form
    so when I choose one of the rows and they brought to the text boxes assigend to them after that when I make "Commit" I got that error
    thank you for help
    and sorry for bieng late in reply, I don't have enternet after 2:00 pm

  • Unable to View records in a master-detail form

    In a master-detail form, I am not able to view records of the master/detail table
    by accepting the values of the PK of the header table items.
    Please tell me the exact steps, so that I can view the detail table records based on the header table PK items.
    Thanks.

    Yes I wrote the LOV code in a different procedure. Now, the view is showing correctly. But I am now trying to update the viewed records.
    The steps I am following in View Option is as below:
    go_block('header');
    clear_block(no_validate);
    execute_query;
    proc_lov;
    go_block('item');
    execute_query;
    I am unable to commit the changes made in the blocks
    The reason it is showing is : UNABLE TO update.....I saw the display_error.
    The system is trying to update the PK part also..Why....Though PK party is clearly defined in the table as well as property palette. Pl. explain how to go about it. Uregent help is required once again.

  • Oracle forms error frm-40508: unable to insert record

    Hi Everyone,
    I have been having this problem for 2 weeks and I realize that I spent alot of time I couldn't get to fix the problem so I need your help.
    Here is my situation. First, I installed Oracle 10g in my laptop with Oracle forms10g and Oracle forms904i. I had oracle_home folder as the top level structure then I have inside oracle folder, Oracle10g in it own folder, Oracle9i release2 in it own folder. then I created the user account "student" using the system/manager account finally I granted privilleges as follow:
    GRANT ALL PRIVILLEGES
    TO student
    WITH ADMIN OPTION;
    this was working perfecty I didn't need to grant objects privilleges such as
    GRANT INSERT, UPDATE, DELETE
    ON customers
    TO student;
    Then I created a form Application prototype and it works well I could Insert, Update and Delete but now I am creating an e-commerce application prototype I created an new account using a system/manager account as I did previously and grant all privilleges. When I try to grant object privileges the message that I receive says ORA-01919 : role 'INSERT' doesn't exist
    When I run the application I am unable to insert the record through forms I get message frm-40508 Orcle error: unable to insert record.
    I deinstall the Oracle and clean my laptop and did a clean installation using only Oracle Server10g and Oracle Developer10g I am getting the same message frm-40508.
    Can someone please help me on this. the insert command that I am running is a simple one such as
    INSERT INTO customers
    VALUES( block_name.field_name, ....);
    COMMIT;

    frm 40735:When button pressed trigger raised unhanded exceptionplease help me to solve this>
    The FRM-40735 is a generic Unhandled Exception. Please post the full error message so we can better help you.
    Craig B-)
    If someone's response is helpful or correct, please mark it accordingly.

Maybe you are looking for

  • Transaction code for creation of a specific customizing table ?

    Hi, What's the transaction code for creation of a specific customizing table ? Thanks in advance.

  • Customize Hierarchy from Infoview

    Dear all, I've to set customize Hierarchy at report level. I already set Hierarchy at universe and select all Hierarchy objects at report level. So all the selected Hierarchy objects are available in "Drill by" menu in a report. But i want to keep on

  • Report a hacker

    Hi, it has taken me days to get ANYWHERE into skype and ask for HELP! please, someone respond. Someone I know suddenly truned on me and hacked my account, kept changing languages so I couldn't read where to delete and report them. Is there a number t

  • PC to Mac Adobe Creative Suite transfer

    I have the Adobe Creative Suite installed on my PC which has crashed and I'm hoping to transfer my license to my new Mac if this is feasible? I am hoping so! Thank you!

  • Cannot download, delete, update Itunes. Missing Bonjour.msi

    Cannot download, delete or update my itunes. I'm missing bonjour.msi. There has to be a way to fix this without purchasing those fixit programs or rebooting my whole system.