How to insert a new record or update existing record by using a view complex?

Currently, I created this screen, there is no problem on display data, on the update feature (average TI insert / update / delete on the table for which the view is based on).

I have a table and a view complex in order to display the information in the table in a form of tabellar (IE up to 70 record in same "record" in the form, one for each article)

The view is like this



Select a.f1, a.f2, get_value(a.pk1,1) a1, a2 get_value(a.pk1,2), get_value(a.pk1,3) a3...

from my_table a

where a.proj_id = user





and I want to allow the update of the field a1, a2, a3 in a multiplace (tabellar) canvas.

I created a TRIGGER INSTEAD.

But it works not only in the form. I get FRM-40654 error when I try to change the existing value in the form running based on this point of view.

The view is woking and editable using sql-plus.

If I have question
Select * from ALL_UPDATABLE_COLUMNS where table_name = 'SPV_BOQ_BOM_POS_ACTIVITIES ';

where "SPV_BOQ_BOM_POS_ACTIVITIES" is the name of my point of view.

The question is: why if the view is updatable using SQL * Plus, is not editable using the Oracle 10 g 2 form?

Could someone help me ASAP?

Thank you

Forms to lock the record when you start editing. It is is by a statement of the type

SELECT 
  FROM 
 WHERE =
   FOR UPDATE NOWAIT;

If this attempt fails, the error you are getting is displayed. As solution to create a trigger-LOCK-ON on the block and with which replace standard logic.

Tags: Oracle Development

Similar Questions

  • How to insert only new registrations in GR 11, 1 material

    Hi friends,

    Every hour, I have a few records in a table that has a unique primary key.

    I want to insert only new records up to and ignore duplicate keys (meaning it shouldn't fail with "forced to uniqueness (TEST.) TEST_PK) violated" . Is there an easy way to do it? (I read that we can use MERGE, but did not understand how to rewrite my request accordingly)

    Note: DB is on 11 GR 1 material so I can't use IGNORE_ROW_ON_DUPKEY_INDEX (introduced in 11 GR 2).

    Query : for example hard-coded Date

    Insert / * + append parallel(TEST12,8) * / into TEST TEST12

    SELECT

    /*+

    Leading (a.c)

    Full (a.c) parallel (a.c, 2)

    parallel of full (a.m.) (a.m., 2)

    Full (a.d) parallel (a.d, 2)

    Full (a.n) parallel (a.n, 2)

    PQ_DISTRIBUTE (hash of hash a.n)

    */ *

    OF DATA_VIEW one

    WHERE the st_date BETWEEN TO_DATE (16 March 14 00:00:00 ',' DD-MON-RR HH24:MI:SS')

    AND TO_DATE (16 MARCH 14 23:59 ',' DD-MON-RR HH24:MI:SS');

    What did I try?

    DBMS_ERRLOG.create_error_log, but still it gives the same error.

    The ERRORS IN err LOG $ _dest2 ('1 comment') REJECTS LIMIT UNLIMITED;

    Insert / * + append parallel(TEST12,8) * / into TEST TEST12

    *

    ERROR on line 1:

    ORA-12801: error reported in the parallel query P005 Server

    ORA-00001: unique constraint (TEST.) TEST_PK) violated

    Can you please suggest what is the effective way to do it?

    This should work for you (change column lists to match the column names in your version of these tables):

    SQL> create table test12(
      2          st_id number not null,
      3          st_stuff varchar2(40),
      4          st_date date);
    
    Table created.
    
    SQL>
    SQL> create table test1(
      2          st_id number not null,
      3          st_stuff varchar2(40),
      4          st_date date);
    
    Table created.
    
    SQL>
    SQL> create view data_view as select * from test1;
    
    View created.
    
    SQL>
    SQL> begin
      2          for i in 1..100 loop
      3                  insert into test1
      4                  values(i,'Stuff '||i, sysdate-mod(i,9));
      5          end loop;
      6
      7          commit;
      8  end;
      9  /
    
    PL/SQL procedure successfully completed.
    
    SQL>
    SQL> merge into test12 t12
      2  using (SELECT
      3    /*+
      4      leading(a.c)
      5      full(a.c) parallel (a.c,2)
      6      full(a.m) parallel (a.m,2)
      7      full(a.d) parallel (a.d,2)
      8      full(a.n) parallel (a.n,2)
      9      pq_distribute(a.n hash hash)
     10    */ *
     11  FROM DATA_VIEW a
     12  WHERE st_date BETWEEN TO_DATE('16-MAR-14 00:00:00','DD-MON-RR HH24:MI:SS')
     13                      AND TO_DATE('16-MAR-14 23:59:00','DD-MON-RR HH24:MI:SS')) dv
     14  on (dv.st_id = t12.st_id)
     15  when not matched then
     16          insert (t12.st_id, t12.st_stuff, t12.st_date)
     17          values (dv.st_id, dv.st_stuff, dv.st_date);
    
    12 rows merged.
    
    SQL>
    SQL> select count(*) from test12;
    
      COUNT(*)
    ----------
            12
    
    SQL>SQL> begin
      2          for i in 101..200 loop
      3                  insert into test1
      4                  values(i,'Stuff '||i, sysdate-mod(i,9));
      5          end loop;
      6
      7          commit;
      8  end;
      9  /
    
    PL/SQL procedure successfully completed.
    
    SQL>
    SQL> merge into test12 t12
      2  using (SELECT
      3    /*+
      4      leading(a.c)
      5      full(a.c) parallel (a.c,2)
      6      full(a.m) parallel (a.m,2)
      7      full(a.d) parallel (a.d,2)
      8      full(a.n) parallel (a.n,2)
      9      pq_distribute(a.n hash hash)
     10    */ *
     11  FROM DATA_VIEW a
     12  WHERE st_date BETWEEN TO_DATE('16-MAR-14 00:00:00','DD-MON-RR HH24:MI:SS')
     13                      AND TO_DATE('16-MAR-14 23:59:00','DD-MON-RR HH24:MI:SS')) dv
     14  on (dv.st_id = t12.st_id)
     15  when not matched then
     16          insert (t12.st_id, t12.st_stuff, t12.st_date)
     17          values (dv.st_id, dv.st_stuff, dv.st_date);
    
    11 rows merged.
    
    SQL>
    SQL> select count(*) from test12;
    
      COUNT(*)
    ----------
            23
    
    SQL>
    
    David Fitzjarrell
    
  • Hello. I just know that the muse and I need an organization of customers in alphabetical order. The problem is that you will always get new clients. I need to know how to insert a new customer (square), and it is already in alphabetical order on the page.

    Hello.

    I just know that the muse and I need guests alphabetical organization. The problem is that you will always get new clients. I need to know how to insert a new customer (square), and it is already in alphabetical order on the page. The site will be as in the link below, and each customer will have a window of these: http://www.connary.com/. I look back.

    A hug, Murilo.

    I believe you are referring to the rectangles of tile as visitors on the page? not exactly customer database?

    You can add rectangle with different effects with rollover State of mouse and about adding new, you must do this manually in design mode.

    Thank you

    Sanjit

  • Inserting a new record in the database using a form empty ADF

    Hello

    I'm trying to insert a new record into the database using a form.

    I have an Employee table and its corresponding entity object and the view object. The table has an id that is used as the primary key and is filled using a sequence in the comic book.

    Data controls, I dragged and dropped at the sight of the employee as a form of ADF and checked the submit button include. Then I dragged and dropped the validation on submit button operation.

    When I connect to the app and go to the page used to create, I have 2 problems:
    1 - the form is filled with the logged in user info.
    2. If I try to change the news and validation, the user info is changed in the database and no new record is created.

    It makes a little sense to me, but I would like to know if there is a way around it (get an empty form and insert a new record).
    NB: the employee id is not part of the form, I want to be filled using the sequence.

    Kind regards
    MB

    User, please tell us your jdev version!

    To do this, you must create a new record before going to the display of the form page. In a stubborn workflow (btf), you drag the operation createInsert of the VO on the btf and it will generate a link method, add a view to the btf and put a navigation of the binding of the method of the page. Mark the method as 'Activity by default'. Now, ren, you call the workflow, you create a new record that will show your blank form.

    Timo

  • Triggers when an arrows of the user down the block to insert a new record

    I'm looking for a trigger that fires when the arrows user beyond the last record in a block to insert a new record. Is there a trigger that fires at this point?

    WHEN CREATE RECORD fires in this situation.
    but it also fires if the block is empty and gets the focus.

  • How to pre-fill a field before inserting the new record in the same block

    I'm obviously new to the forms and need help! I need to insert new records based on the lodge currently in the same block.

    In the block, I specify a lodge (lodge 0000) and run the query for this particular lodge. I want to insert new records
    for lodge 0000. The number of dressing room must be pre-fill with lodge 0000 and I have to do is enter the others
    provide the information.

    How to make a form to pre-fill the field lodge?

    Instead of global variables, why do you not use "Form settings" which are specific to your form? You can use them in the property 'Initial value' similar to global variables.

  • Why insert the new record is a strange behavior?


    Hello world

    My version of Jdeveloper is 11.1.2.3.0.
    I have a link command, on, click on this link im popup trigger command with showpopupbehaviour.
    Popupfetchlistener im createInsert of operation and inserting some required attributes using the setAttribute method in the new row of the table.
    Inside pop up I have dialogue, inside, dialogue I dragged a few attributes of EO based VO on the page. And have the OK button.
    When you click on ok button it pulls dialogListener, where im running commit operation.

    Now everything works fine without error, but the file does not appear when I run this query VO in Toad. What can be the reason?

    Note: I have a primary column, so I tried to hard code value (ex: empno = 898) and saved only record twice, but the second time it is throwing error as primary key attribute
    cannot be set to double, but in the table, I see no new inserted record.


    If the record is not inserted how it can show the primary key constraint error when I try to register the same new record?
    If the record is inserted then why it does not appear in the table?

    IM totally confused with this behavior of my pop up insert in the registration of the new table.

    Your entries will be really useful.

    Thank you.

    Hello

    Problem solved when I used Commit h.

    this.getDBTransaction () .commit ();

    Thank you.

  • How to insert the new line char in sticky c# code?

    Hi all

    I paste the code complete c# on a line of string as follows.

    int _intUserID = 0; string _strUserName = string. Empty; string _strEmployeeID = string.empty;
     
    c# VS2005 .cs file code should stick as follows.

    int _intUserID = 0;
    String _strUserName = string. Empty;
    String _strEmployeeID = string. Empty;

    So how do you achieve this. by inserting the new line char in c#?

    Hi Murthy,

    Thanks for posting your query in Microsoft Community.

    I understand that you have problems with the code in Visual studio.

    The question you posted corresponds to the coding software, it would be better suited to the MSDN Community.

    Please visit the link below to find a community that will provide the support you want.

    http://social.msdn.Microsoft.com/forums/en-us/category/VisualStudio

    Hope it will be useful. If you still have questions, please reply and we will be happy to help you.

  • [ADF, JDev12.1.3] How to create a new record in a table filling one filed with the IP address of the client?

    Hallo,

    I create a stubborn workflow that begins with a create operation on the table where a new record should be added.

    The recording fields must be filled in by the user, but before committing, I have to fill a field of the reocord with the address IP of the PC of the user.

    Could you kindly advice me which are the possible recommended approaches to achieve this?

    Thank you

    Federico

    Hello

    See this post: Blog of Zeeshan Baig: how to get the IP address of the customer in ADF merge request

    You can use a createWithParams operation and to fill in this field.

    Reference: Andrejus Baranovskis Blog: CreateWithParams operation for Oracle ADF 11g BC

    Kind regards

    Ruben.

  • How to create a new record with the old values

    Hi all

    I have the creation with 45 page are there fields
    the user will enter all areas and save, it will call the uneditable mode

    If the change button is clicked it will call for the editable mode

    My requirement is user will not change among these ites (45 items) clcik on save again it will call to view mode

    in this user will change one value among 45 Articles and click on the button Save I need to create more than one record in the database

    If the user will not modify one of the field elements of the 45 I will not create a new record in the database

    How can we achieve this feature


    Concerning
    Anthony

    Hi Mary,

    Please try this method to copy a line in the new line...

    public void copy()
    {
    Pervert SuppliersVOImpl = getSuppliersVO1();
    Rank rank [] = pervo.getFilteredRows ("SelectFlag", "Y");
    for (int i = 0; i)<>
    {
    Rowi rank (SuppliersVORowImpl)= SuppliersVORowImpl;
    OADBTransaction trx (OADBTransaction) = getTransaction ();
    Number b = trx.getSequenceValue ("FWK_TBX_SUPPLIERS_S");
    AttributeList a rowi = (AttributeList);
    R = (SuppliersVORowImpl) pervo.createAndInitRow SuppliersVORowImpl (a);
    Define your unique attribute values here, I'll put here Ref supplier as with each new line, it must be different.
    r.setSupplierId (b);
    pervo.insertRow (r);
    }
    }

    Kind regards
    Out Sharma

  • How to open a new tab in an existing window so that it automatically opens with the web site to the home page?

    By opening a new web browser window my chosen site associated with my home page opens automatically, but each new tab open then [in this window] is empty. How do you define new tabs opening with the site, just like the initial tab only when you open the browser window?

    You can do this by using an add-on such as:

    Another way to open the home page in a new tab is in the Middle, click the home button in the navigation toolbar.

  • How to dynamically add new FlowElement elements to existing through markup TLF TextFlow

    Is there a way to create a new item of FlowElement (for example a DivElement) of markup text without having to go through the TextFilter.importToFlow function?

    What I'm trying to accomplish is the following:
    I have an already built TextFlow.
    I get a text I want to inject into the TextFlow as a new item somewhere in the existing TextFlow.

    The method I use to achieve this is to create a second TextFlow from markup via the importToFlow function. Can I get the second flow element and make a deepCopy of it in a new item 'not known '. Finally, I use this new 'owner' element in my main code by adding it as a child of the original TextFlow.
    My function that focused.
    Thank you.
    Tim

    There isn't anyway to do today without the help of importToFlow.

    Looks like what you want is similar to innerHTML and innerXHTML. Ideally, TLF would be offered to the implementations for getInnerTLFMarkup and setInnerTLFMarkup for use as described below. I also suspect that if TLF should implement these features today we would use importToFlow under the hood.

    read the markup
    var flowElement:FlowElement = getFlowElement();
    var tlfMarkup:String = getInnerTLFMarkup (flowElement);

    write the tag
    var flowElement:FlowElement = getFlowElement();
    var tlfMarkup:String = getTLFMarkup();
    setInnerTLFMarkup (element flowElement, tlfMarkup);

  • How to insert the same record repeatedly in a loop...

    Dear all,

    I need to insert a record several times how it can be to accomplish...

    for example:

    REF no name dept
    ABC 123 1
    122 def 2
    121 1 FEG
    120 2 HHH

    When inserting in another table:

    all dept No 1 with should insert 3 times for each record above

    should be final out put:

    Table abc

    REF no name dept
    ABC 123 1
    ABC 123 1
    ABC 123 1
    122 def 2
    121 1 FEG
    121 1 FEG
    121 1 FEG
    120 2 HHH


    Thank you

    In this case, go with an outer join.

    SQL> SELECT * FROM DEPT;
    
        DEPTNO DNAME          LOC
    ---------- -------------- -------------
            10 ACCOUNTING     NEW YORK
            20 RESEARCH       DALLAS
            30 SALES          CHICAGO
            40 OPERATIONS     BOSTON
    
    SQL> ed
    Wrote file afiedt.buf
    
      1  SELECT DEPT.*
      2    FROM DEPT
      3        ,(    SELECT 10 DEPTNO
      4                FROM DUAL
      5          CONNECT BY LEVEL <= 3) GEN
      6*  WHERE DEPT.DEPTNO = GEN.DEPTNO(+)
    SQL> /
    
        DEPTNO DNAME          LOC
    ---------- -------------- -------------
            10 ACCOUNTING     NEW YORK
            10 ACCOUNTING     NEW YORK
            10 ACCOUNTING     NEW YORK
            20 RESEARCH       DALLAS
            30 SALES          CHICAGO
            40 OPERATIONS     BOSTON
    
    6 rows selected.
    
    SQL> 
    

    G.

  • How to insert a new accessory through java code

    Hello world

    I need to add a new accessory through java code. I found the service EDIT_RENDITIONS in the add attachments page. But this service is not documented. Does anyone have an example how to add attachments?

    Thank you

    Martin

    Martin,

    Try the following code:

    final IdcClientManager clientManager = new IdcClientManager();

    Customer IdcClient;

    try {}

    client = clientManager.createClient (IDC_PROTOCOL + RIDC_SERVER + ":" + RIDC_PORT);

    final String username = 'sysadmin ';

    final DataBinder dataBinderReq = client.createBinder ();

    ServiceResponse severiceResponse = null;

    dataBinderReq.putLocal ("IdcService", "EDIT_RENDITIONS");

    dataBinderReq.putLocal ("a", '1560'); as integer

    dataBinderReq.putLocal ("dDocName", "DEV2_001509"); AsString

    dataBinderReq.putLocal ("renditionKeys", "addRendition0"); AsString

    dataBinderReq.putLocal ("addRendition0.name", "theFileName");

    dataBinderReq.putLocal ("addRendition0.description", "theFileDescription");

    dataBinderReq.putLocal ("addRendition0.action", "modify");

    final String fileName = "c:\\test.txt";

    final file = new File (fileName);

    final TransferFile tf = new TransferFile (queue);

    dataBinderReq.addFile ("addRendition0.file", tf); as bytes

    severiceResponse = client.sendRequest (new IdcContext ("username"), dataBinderReq);

    final DataBinder dataBinderResp = severiceResponse.getResponseAsBinder ();

    DataBinder resultado = severiceResponse.getResponseAsBinder ();

    System.out.println (dataBinderResp.ToString ());

    } catch (final IdcClientException e) {}

    System.out.println (e.getMessage ());

    e.printStackTrace (System.out);

    }

    Jonathan

    http://jonathanhult.com

  • inserting a new record in the database of a form

    Hi friends,

    I'm trying to insert a record into the database via a form I created in Oracle 10 g.
    Using the default menu (DEFAULT & bar SMARTBAR), I should be able to save the record, shouldn't I?

    Is someone can you please help me solve this problem?

    Thank you, sheetal :)

    Check if your code sequence and make like this code example (focused only on the "BOLD" letters, because I think that your specific sequence will not be in order i.e. ALL), you must make your sequence in order with no cycle.

    CREATE the SEQUENCE "YOUR_SEQUENCE_NAME" MINVALUE 1 MAXVALUE 99999 INCREMENT OF 1 START WITH 1 CACHE 20 ORDER NOCYCLE .

    Hope this will help.

    Abbas

Maybe you are looking for