6 Replies Latest reply: Aug 8, 2012 8:25 AM by sat33boy RSS

    oracle forms 10g,multiple insert and update problem

    sat33boy
      Hi,

      I have tabular form(4 records displayed) with one datablock(based on a view).
      After querying the form could not update all the records but only first record value can select from LOV.
      I called a procedure in in-insert and on-update
      The query is lik this
      PACKAGE BODY MAPPING IS

           PROCEDURE INSERT_ROW(EVENT_NAME IN VARCHAR2)
           
           IS
           
           BEGIN
                
                IF (EVENT_NAME = 'ON-INSERT') THEN
                          
                     INSERT INTO XX_REC_MAPPING
                     (BRANCH_CODE,COLLECTION_ID,PAY_MODE_ID,RECEIPT_METHOD,CREATED_BY,
                     CREATION_DATE,LAST_UPDATED_BY,LAST_UPDATE_DATE,LAST_UPDATE_LOGIN)
                     VALUES
                     (     :XX_REC_MAPPING.OFFICE_CODE,
                          :XX_REC_MAPPING.COLLECTION_ID,
                          :XX_REC_MAPPING.PAY_MODE_ID,
                          :XX_REC_MAPPING.RECEIPT_METHOD,
                          :XX_REC_MAPPING.CREATED_BY,
                          :XX_REC_MAPPING.CREATION_DATE,
                          :XX_REC_MAPPING.LAST_UPDATED_BY,
                          :XX_REC_MAPPING.LAST_UPDATE_DATE,
                          :XX_REC_MAPPING.LAST_UPDATE_LOGIN);     
                          
                          
                ELSIF (EVENT_NAME = 'ON-UPDATE') THEN          
                     
                UPDATE     XX_REC_MAPPING
                SET BRANCH_CODE=:XX_REC_MAPPING.OFFICE_CODE,
                          COLLECTION_ID=:XX_REC_MAPPING.COLLECTION_ID,
                          PAY_MODE_ID=:XX_REC_MAPPING.PAY_MODE_ID,
                          RECEIPT_METHOD=:XX_REC_MAPPING.RECEIPT_METHOD,
                          LAST_UPDATED_BY=:XX_REC_MAPPING.LAST_UPDATED_BY,
                          LAST_UPDATE_DATE=:XX_REC_MAPPING.LAST_UPDATE_DATE,
                          LAST_UPDATE_LOGIN=:XX_REC_MAPPING.LAST_UPDATE_LOGIN
                          WHERE ROWID=:XX_REC_MAPPING.ROW_ID;
                          
                          
                END IF;
                     
           END INSERT_ROW;

      END MAPPING;

      Whether the table gets looked or sholud i use some other trigger or loops ?
      someone suggest me how to edit this query for multiple update.
      Thanks
      sat33