Pre-insert trigger is not firing after post built-in

Hi,
I have a 10g form in which Post built-in is used in When-button-pressed Trigger. After the post command I am checking some condition,by using the same record which I have posted.But it is not working.
I have also put the message in the pre-insert trigger but the message is not displaying.
But the same form iis working fine in form 6i, as I have migrated the forms from form 6i to 10g.

Yes, In that block there are other items also. I have made the required property no for all the items.
what exactly we have is
(if x=y then)on some condition check
POST;
After that, form have a select statement in which it is selecting the same row which is being posted above.
if the select statement gives count of row zero
raise form_trigger_failure is fired.
and in the pre-insert trigger form is assigning a value to a block item.

Similar Messages

  • Pre-Insert Trigger not firing

    Hi,
    I am using Oracle 10G DS with Oracle 11G XE. I tried PRE-INSERT Trigger with the Code given by Mr Hamid. However, its not working. Though, the WHEN-NEW-ITEM-INSTANCE works fine, I wish to use PRE-INSERT Trigger only.
    Can you please help me.
    My Code is shown below
    BEGIN
    SELECT asset_id_seq.nextval INTO :r_it_blk.asset_id
    FROM dual;
    END;
    Thanks in advance
    Ramesh

    Hi Hamid,
    Thank you very much for your reply.
    I tried at Block Level itself. Further, I also tried the below Code with Cursor (Block Level). Unfortunately, it is also not working. Even the Error Message is also not displayed. The User has full privileges.
    DECLARE
         CURSOR next_id IS SELECT asset_id_seq.NEXTVAL FROM dual;
    BEGIN
         OPEN next_id;
         FETCH next_id INTO :r_it_blk.asset_id;
         CLOSE next_id;
         IF :r_it_blk.asset_id IS NULL THEN
         Message('Error Generating Next Asset ID');
         RAISE Form_Trigger_Failure;
         END IF;
    END;
    Regards
    Ramesh

  • Pre-insert-trigger ignoring assignments

    Hi,
    I have this code in a PRE-INSERT-TRIGGER of a database table block:
    Select emp_seq.Nextval Into :EMP.EMPNO From dual;
    Select Sysdate Into :EMP.LASTCHANGED From dual;
    And i have this code in a PRE-UPDATE-TRIGGER of the same block:
    Select Sysdate Into :EMP.LASTCHANGED From dual;
    given scenario:
    1) query records from the table into a block:
    empno ename lastchanged
    1 Smith 01.12.2008
    2 Johnson 01.12.2008
    2) change empname in any record except no. 1:
    empno ename lastchanged
    1 Smith 01.12.2008
    2 Johannson 01.12.2008
    3) create a new record somewhere above the changed record
    empno ename lastchanged
    1 Smith 01.12.2008
    <null> <null> <null>
    2 Johannson 01.12.2008
    4) insert ename in new record
    empno empname lastchanged
    1 Smith 01.12.2008
    <null> Obama <null>
    2 Johannson 01.12.2008
    5) do_key('commit_form')
    with Forms 6.0.8.23.2 -> working fine
    with Forms 6.0.8.27.0 -> ORA-01400:: cannot insert NULL into ("EMP"."EMPNO")
    Any assignment in the pre-insert-trigger is ignored! Can anyone help me with this bug? Thanks in advance

    message(:EMP.EMPNO) is always Null ...
    Everything works if there's no update of a record with higher record-number in the transaction. But the scenario in post 1 doesnt work with Forms 6.0.8.27.0Ugh -- that's ugly!
    Unfortunately, opening a Service Request with Oracle will get you nowhere, since Oracle no longer supports Forms 6i.
    Yesterday, I experienced something very similar with the same version of Forms, specifically this part: Everything works if there's no update of a record with higher record-number in the transaction.*
    If I updated a higher record number in the block, I could NOT get Forms to subsequently store a value in a column in a prior record. I would set the value in the column, and immediately display the value, and it was null! Fortunately in my case, the stored value was only to enable skipping a database lookup in a subsequent pass, so I just skipped working on a solution.
    However, in your case, the problem is a show-stopper.
    What I found was that if I navigated back to the first record in the block, the problem went away. So maybe try this in your commit process:
        Go_block('ABC');
        First_Record;
        Synchronize;
        Commit_Form;Let us know if that works for you.

  • Writing PRE-INSERT trigger in CUSTOM.pll

    Hi,
    We need to write data in a staging table after every save of a Block Data on the eBusiness Center form. How can we achieve this? Can we write PRE-INSERT trigger in CUSTOM.pll.
    Thanks for helping,
    Regards,
    Viral

    Hi. Thanks for the reply. I was trying with Workflow Based Business Events. I am not sure how can I achieve the same with it.
    I was thinking of doing the same using ALERTs. But, I think that is not Oracle suggestable method of doing it? If at all I am going to use the ALERTs than will it be real time?
    Thanks for replying,
    Regards,
    Viral.
    Message was edited by:
    Viral

  • Forms 9i & pre-insert trigger

    Hi everyone,
    We've just upgraded from Forms 6 to 9i.
    My pre-insert trigger in 9i doesn't seem to be firing - is this something that has changed?
    I need to set my unique ID's and other variables - is there a better place to do this now?
    Please advise.
    Thanks.
    Lesley

    No commit form has not changed.
    The change in behavior that you are probably hitting is where required items really are required even if they are not displayed - this change came in a patch to 6i.
    So I'm guessing that you have a key field which is required but not displayed to the user and you're populating a new key in pre-insert.
    Because you've made the field required, the commit is failing before you actually get to pre-insert because a required field is not filled in.
    So your solution would be to restore the code to Pre-Insert where it belongs and make sure that any non-displayed items are not marked as required.
    Support have a Forms API program that can make this change on-mass for you if you have a lot of forms like this,

  • Problem with forms6i using Pre-Insert Trigger

    I created a block level pre-insert trigger to do some validations and when I save the first time with wrong data it is working fine and popping up alerts that I defined but if I press save the second time it is saving even though the data is wrong.
    This is in Applications 11.5.10 using all the property classes and running on the server.
    I created exact replica of the form(no applications, property classes
    just basic form but with same functionality) and ran it on my local machine it is working fine. It is giving error till the data is fixed.
    Anybody know why?
    Thanks in advance

    It did not work. It is still doing the samething. Actually it is popping up my alerts but saving the record first time itself. Is there any way I can tell it not to save if the data is wrong. My code is below it basically pops up the alerts but doesn't tell anywhere not to save it.
    Thanks
    VJ
    declare
         v_amount number;
         alert_id      ALERT := Find_Alert('amount_from');
         alert_id1 ALERT := Find_Alert('amount_to');
         dummy_var NUMBER;
    begin
         select max(ssibe_amount_to) into v_amount from ssibe_orderappr_tab where
              ssibe_account_number = :ssibe_orderappr.ssibe_account_number;
              if :ssibe_orderappr.ssibe_amount_from <= v_amount
              then
                   Set_Alert_Property(alert_id, ALERT_MESSAGE_TEXT, 'Amount_From should be greater than '|| v_amount);
                   dummy_var := Show_Alert(alert_id);
              else
                   IF (:SSIBE_ORDERAPPR.SSIBE_AMOUNT_TO <= :SSIBE_ORDERAPPR.SSIBE_AMOUNT_FROM)
                   THEN
                   dummy_var := Show_Alert(alert_id1);
                   end if;
              end if;
    end;

  • Error from Pre-Insert Trigger

    I am using the following code in Pre-insert trigger
    purpose is that all the record which do not click by mouse (check box)
    should be cleared on the screen when commit/save.
    declare
    begin
    go_block('Bl');
    first_record;
    loop
    if :kcheck is null then
    clear_record;
    else
    Exit When :System.Last_Record = 'TRUE';
    Next_Record;
    end if;
    end loop;
    end;
    it is showing error FRM-40737
    illegal restiricted procedure NEXT_RECORD in pre-insert trigger
    when I used this code in when button press trigger it is working.????
    Message was edited by:
    Kami

    Navigation is not allowed in this kind of triggers.
    PRE-INSERT is used to, for instance, put values on non NULL column in the current record.
    If you want to navigate in the records, choose another trigger, like KEY-COMMIT for example.
    Francois

  • PAYMENT 처리시 PRE-INSERT TRIGGER (VALUE_ERROR)

    제품 : FIN_AP
    작성날짜 : 2005-05-10
    11.0.3 - PAYMENT 처리시 PRE-INSERT TRIGGER (VALUE_ERROR)
    ==============================================
    PURPOSE
    Problem Description
    Payment 화면에서 특정 Invoice 선택 후 저장 시 아래와 같은 Error Message 가 발생함.
    Payment 화면에서 Invoice 선택 후 저장 시 FRM-40735 PRE-INSERT TRIGGER ERROR 가 발생함.
    Workaround
    해당 Form Version이 110.83 이전 Version일 경우 아래와 같이 Code fix 한다.
    1. Payment Form Source File (APXPAWKB.fmb)는 backup 받아 놓습니다.
    2. Oracle Forms 에서 해당 Form Source File 을 열어 아래 부분을 수정 합니다.
    'ADJ_INV_PAY_PROC_INSERT' package 의 'SUB_PRE_INSERT' procedure 를 찾아 l_inv_remit_to 의 length를 80 으로 수정 합니다.
    Example)
    ->수정 전
    procedure SUB_PRE_INSERT is
    l_withhold_amount NUMBER;
    l_awt_success VARCHAR2(2000);
    l_pipe_name          VARCHAR2(2000);
    l_inv_remit_to     VARCHAR2(25); --> 변경 해야 할 부분
    ->수정 후
    procedure SUB_PRE_INSERT is
    return_value VARCHAR2(30);
    l_withhold_amount NUMBER;
    l_awt_success VARCHAR2(2000);
    l_pipe_name          VARCHAR2(2000);
    l_inv_remit_to     VARCHAR2(80);
    3. 위와 같이 수정 후 해당 Form Source 를 Compile 하고 Generate 합니다.
    4. 다시 해당 Payment에 대해서 Invoice 를 Apply 해서 Error 가 발생하는지 여부를 확인 합니다.
    Solution Description
    11.0.3 AP D Patchset 이상을 적용한다.
    Reference Documents
    Bug 921350

    Navigation is not allowed in this kind of triggers.
    PRE-INSERT is used to, for instance, put values on non NULL column in the current record.
    If you want to navigate in the records, choose another trigger, like KEY-COMMIT for example.
    Francois

  • Date Format Issue with Pre-Insert trigger

    I have created a form wherein creation_date and last_update_date are columns in a table that needs to be populated with sysdate (in format mm/dd/yyyy hh:mi:ss am) at time of saving.
    In pre-insert triiger, if I assign date as follows , it works:
    :creation_date=sysdate;
    However this creates date in format yyyy/mm/dd.
    I would like to set it in format mm/dd/yyyy hh:mi:ss am.
    How can this be done-I tried using to_date and to_char but wont work.
    Any ideas?

    hi
    u may try this too.
    when-new-form-instance trigger:
    set_application_property(PLSQL_date_FORMAT,'DDMMYYYY HH12:MI:SS');
    set_application_property(BUILTIN_date_FORMAT,'DDMMYYYY HH12:MI:SS');
    forms_ddl('ALTER SESSION SET NLS_date_FORMAT=''DDMMYYYY HH12:MI:SS'''); sarah

  • Storage location is not updated after posting GR with Mvt type 107(Valuated GR blocked stock)

    Hi experts,
    Before posting GR through Movement type 107 (valuated GR blocked stock) we can see the storage location field in MIGO screen and able to enter value into this field. But after posting GR when we retrieve the material document we are finding that the field (storage location) is blank, i.e. it's not updated at all. When we check the stock in MMBE we find that no quantity is updated for valuated GR blocked stock.
    We want the storage location to be updated while posting GR with 107 Mvt type.
    Any idea Please?
    Points assured.
    Thanks
    Amitava

    SAP describes it in help.sap.com: Since the material is not to be added to the inventory yet, do not enter a storage location.
    If you require a storage location, then I assume that your design does not match with the design of SAP, you are using a function to solve a gap which is not foreseen by SAP for this case.
    Especially the 107 is usually representing stock which is still in transfer but you are already the legal owner and have to show the value of those goods in your books.

  • Part2 tab not coming after posting the part1 through J1IEX

    Dear Experts,
    when I post the part1 entry through J1IEX,
    Part2 entry tab not shown when i display the document,
    please advice me where the required config is missed,
    thanks in advance
    lakshmi reddy

    Dear,
    In your case, Check your input Tax code in Purchase Order . If its modavatable then when you tick at migo item ok Excise Tab must be displayed at header level. After posting when you see MIGO document, check at header level excise tab and see part2 entry.
    More general look like you have inputed wrong tax code.
    Regards,
    Rajesh koladiya

  • PRE-INSERT TRIGGER

    Dear All,
    In my pre-insert block Level triiger. I have the followed code.
    declare
    l_cnt pls_integer;
    cursor c1 is
    select count(1) into l_cnt
    from jnpp_barcode_master
    where organization_id = :ctrl_blk.inv_org_id
    and item_id = :jnpp_grv_lines.item_id
    and bar_code = :jnpp_grv_lines.bar_code
    and publication_date= :jnpp_grv_lines.publication_date;
    begin
         for r1 in c1 loop
              if l_cnt = 1 then
                   insert into jnpp_barcode_archive
                   (organization_id, item_id, bar_code, publication_date, po_list_price,
    selling_price, received_qty, reference, created_by, creation_date,
    last_updated_by, last_update_date)
    values (:ctrl_blk.inv_org_id, :jnpp_grv_lines.item_id, :jnpp_grv_lines.bar_code, :jnpp_grv_lines.publication_date, :jnpp_grv_lines.po_list_price,
    :jnpp_grv_lines.selling_price, :jnpp_grv_lines.qty, :jnpp_grv_lines.REFERNCE, :GLOBAL.X_USER_ID, sysdate,
    :GLOBAL.X_USER_ID, sysdate);          
              elsif l_cnt = 0 then
                        update jnpp_barcode_master
                        set publication_date = :jnpp_grv_lines.publication_date,reference =:jnpp_grv_lines.refernce
         where organization_id = :ctrl_blk.inv_org_id
         and item_id = :jnpp_grv_lines.item_id
         and bar_code = :jnpp_grv_lines.bar_code;
    end if;      
         end loop;
    forms_ddl('COMMIT');
    end;
    it is encountered the symbol 'INTO'.
    Im using forms 6i.
    please any one can help me.
    Thanks
    Siva

    declare
    l_cnt pls_integer;
    cursor c1 is
    select count(1) into l_cnt
    from jnpp_barcode_master
    where organization_id = :ctrl_blk.inv_org_id
    and item_id = :jnpp_grv_lines.item_id
    and bar_code = :jnpp_grv_lines.bar_code
    and publication_date= :jnpp_grv_lines.publication_date;
    begin
         for r1 in c1 loop
              if l_cnt = 1 then
                   insert into jnpp_barcode_archive
                   (organization_id, item_id, bar_code, publication_date, po_list_price,
    selling_price, received_qty, reference, created_by, creation_date,
    last_updated_by, last_update_date)
    values (:ctrl_blk.inv_org_id, :jnpp_grv_lines.item_id, :jnpp_grv_lines.bar_code, :jnpp_grv_lines.publication_date, :jnpp_grv_lines.po_list_price,
    :jnpp_grv_lines.selling_price, :jnpp_grv_lines.qty, :jnpp_grv_lines.REFERNCE, :GLOBAL.X_USER_ID, sysdate,
    :GLOBAL.X_USER_ID, sysdate);          
              elsif l_cnt = 0 then
                        update jnpp_barcode_master
                        set publication_date = :jnpp_grv_lines.publication_date,reference =:jnpp_grv_lines.refernce
         where organization_id = :ctrl_blk.inv_org_id
         and item_id = :jnpp_grv_lines.item_id
         and bar_code = :jnpp_grv_lines.bar_code;
    end if;      
         end loop;
    forms_ddl('COMMIT');
    end;
    --

  • Urgent - After Insert Trigger is not working

    CREATE OR REPLACE TRIGGER TD_ADD_SHIPPING_COST
    AFTER INSERT ON wlcs_order
    REFERENCING NEW AS new_order
    FOR EACH ROW
    BEGIN
    IF (:new_order.order_id IS NOT NULL) THEN
    -- call update_wlcs_order procedure from shipping_cost package
    SHIPPING_COST.update_wlcs_order(:new_order.order_id);
    END IF;
    END TD_ADD_SHIPPING_COST;

    See my answer in your other posting here
    Re: Calling of Stored Procedure in After Insert Trigger

  • After update insert trigger is not working correctly

    Hello experts!
    I created an after insert/update trigger and what strikes me is that it is not working as expected.
    The trigger launches a procedure that does an insert in a second table if values in the triggered table ("my_table") are altered.
    The problem is that the values in my second table, which are correlated to "my_table", are not changed with the correct values right away. The trigger and insert trails behind!
    I have to update twice for the values to appear in my second table. Only then, the data of the first update will be inserted into the second table wheras the parent table ("my_table") will hold the latest values.
    Do you have an idea what could be wrong?
    create or replace
    trigger myscheme.after_update_insert_set_tw
    after update or insert
      on myscheme.my_table
      for each row
    declare
    begin
    pr_my_table_tw_sync_sk(:new.lng_falle, :new.int_fallennummer, :new.lng_schaedling, :new.objectid);
    end;Brgds,
    Seb

    Okay I'll give my best to explain what my procedure is supposed to do and what the table structure is like. I hope it'll help you to help me :-)
    My parent table is called fangzahlen and is created as follows:
    CREATE TABLE "BORKI"."FANGZAHLEN"
       (     "OBJECTID" NUMBER(10,0) NOT NULL ENABLE,
         "LNG_FALLE" NUMBER(10,0) NOT NULL ENABLE,
         "LNG_BEARBEITER" NUMBER(10,0),
         "DATE_DATUM" DATE DEFAULT SYSDATE NOT NULL ENABLE,
         "INT_FALLENNUMMER" NUMBER(4,0) NOT NULL ENABLE,
         "LNG_SCHAEDLING" NUMBER(2,0) NOT NULL ENABLE,
         "INT_VOLUMEN" NUMBER(10,0),
         "INT_ANZAHL" NUMBER(10,0),
         "INT_ANTEIL_JUNGKAEFER" NUMBER(3,0),
         "BOOL_KOEDERWECHSEL" NUMBER(1,0),
          CONSTRAINT "PK_FANGZAHLEN" PRIMARY KEY ("OBJECTID")
      USING INDEX PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS
      STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
      PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)
      TABLESPACE "USERS"  ENABLE,
          CONSTRAINT "CHECK_DATE_DATUM" CHECK ("DATE_DATUM" >= '1.apr.2006') ENABLE
       ) PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 NOCOMPRESS LOGGING
      STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
      PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)
      TABLESPACE "USERS" ;It holds values such as:
    OBJECTID,"LNG_FALLE","LNG_BEARBEITER","DATE_DATUM","INT_FALLENNUMMER","LNG_SCHAEDLING","INT_VOLUMEN","INT_ANZAHL","INT_ANTEIL_JUNGKAEFER","BOOL_KOEDERWECHSEL"
    97548,"39","1081","08.04.10","1","2","","220","","0"
    97534,"39","1081","06.04.10","1","2","","100","","-1"My subtable is called tbl_test and created with:
    CREATE TABLE "BORKI"."TBL_TEST"
       (     "OBJECTID" NUMBER(12,0) NOT NULL ENABLE,
         "LNG_FALLE" NUMBER(10,0),
         "DATE_DATUM" DATE,
         "INT_FALLENNUMMER" NUMBER(4,0),
         "LNG_SCHAEDLING" NUMBER(2,0),
         "INT_VOLUMEN" NUMBER(10,0),
         "INT_ANZAHL" NUMBER(10,0),
         "LNG_FANGZAHLEN" NUMBER(12,0)
       ) PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 NOCOMPRESS LOGGING
      STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
      PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)
      TABLESPACE "USERS" ;Okay, this were the prerequisites!
    Let's concentrate on the trigger and procedure:
    The purpose of the procedure is to insert data into tbl_test once a record in "fangzahlen" has been updated or inserted.
    Tbl_test holds the mean average values (int_anzahl) for a number of collected items (lng_schaedling).
    I need to insert date values for the combination of each lng_fangzahlen, lng_schaedling, lng_falle and int_fallennr into tbl_test.
    If I had the following data in table fangzahlen:
    97548,"39","1081","08.04.10","1","2","","220","","0"
    97534,"39","1081","06.04.10","1","2","","100","","-1"the query in the insert section of my procedure returns the following data when run manually:
    97534     31.03.10     16,667     (null)     1     39     2
    97548     06.04.10     110     (null)     1     39     2Now, I need to generate the dates between the first and the second objectid (column 1 in the data above).
    Hence,
    97534     31.03.10     16,667     (null)     1     39     2
    97534     01.04.10     16,667     (null)     1     39     2
    97534     02.04.10     16,667     (null)     1     39     2
    97534     03.04.10     16,667     (null)     1     39     2
    97534     04.04.10     16,667     (null)     1     39     2
    97534     05.04.10     16,667     (null)     1     39     2
    97534     06.04.10     16,667     (null)     1     39     2
    97548     07.04.10     110     (null)     1     39     2
    97548     08.04.10     110     (null)     1     39     2
    My problem is thatthe values above will only appear after I do another update to table fangzahlen or insert a new record into it. Theoretically the result above should be inserted right away?
    Below is my procedure, which might give you a better idea of what I am trying to do! Please excuse this rather awkward explanation. If you need more info please don't hesitate to ask for it!
    create or replace
    Procedure "PR_FANGZAHLEN_TW_SYNC_SK"
        Pr_falle        Number,
        Pr_fallennummer Number,
        Pr_schaedling   Number,
        Pr_objectid     Number)
    Is
      Y                Number (10);
      pragma autonomous_transaction;
    Begin
    -- first all records should be deleted from the subtable i.e. tbl_test
        delete from borki.tbl_test where lng_falle = pr_falle
            and int_fallennummer = pr_fallennummer
            and lng_schaedling   = pr_schaedling
           and date_datum       > '31.03.2010';
          commit;
          For Rec In
          (select objectid lng_fangzahlen,
            date_datum,
            prev_date,
            (date_datum - prev_date) difference_in_days,
            round((
            case
              when nvl(int_volumen,0) > 0
              and lng_schaedling      = 1
              then int_volumen * 40
              when nvl(int_volumen,0) > 0
              and lng_schaedling      = 2
              then int_volumen * 550
              when nvl(int_anzahl,0) > 0
              then int_anzahl
            end ) / (date_datum - prev_date),3) counted_bugs,
            int_fallennummer,
            lng_falle,
            lng_schaedling
          from
            (select objectid,
              date_datum,
              case
                when lag(date_datum) over(order by date_datum) is null
                then to_date('31.03.2010')
                else lag(date_datum) over(order by date_datum)
              end as prev_date,
              int_volumen,
              int_anzahl,
              int_fallennummer,
              lng_falle,
              lng_schaedling
            from borki.fangzahlen
            where lng_falle      = pr_falle
            and int_fallennummer = pr_fallennummer
            and lng_schaedling   = pr_schaedling
            and date_datum       > '31.03.2010'
           -- and objectid         = pr_objectid
            order by date_datum desc
          order by date_datum asc
          Loop
            Y := 1;
            While Y < rec.difference_in_days + 1
            Loop
              Insert
              Into tbl_test
                  lng_fangzahlen,
                  date_datum,
                  int_anzahl,
                  int_volumen,
                  int_fallennummer,
                  lng_falle,
                 lng_schaedling
              select objectid lng_fangzahlen,
            prev_date +Y,
            round((
            case
              when nvl(int_volumen,0) > 0
              and lng_schaedling      = 1
              then int_volumen * 40
              when nvl(int_volumen,0) > 0
              and lng_schaedling      = 2
              then int_volumen * 550
              when nvl(int_anzahl,0) > 0
              then int_anzahl
            end ) / (date_datum - prev_date),3) counted_bugs,
            int_volumen,
            int_fallennummer,
            lng_falle,
            lng_schaedling
          from
            (select objectid,
              date_datum,
              case
                when lag(date_datum) over(order by date_datum) is null
                then to_date('31.03.2010')
                else lag(date_datum) over(order by date_datum)
              end as prev_date,
              int_volumen,
              int_anzahl,
              int_fallennummer,
              lng_falle,
              lng_schaedling
            from borki.fangzahlen
            where lng_falle      = pr_falle
            and int_fallennummer = pr_fallennummer
            and lng_schaedling   = pr_schaedling
            and date_datum       > '31.03.2010'
            order by date_datum desc
          order by date_datum asc
              commit;
              Y := Y + 1;
            End Loop;
          End Loop; -- end of cursor
      Exception
      When No_data_found Then
        Null;
      When Others Then
        -- Consider logging the error and then re-raise
        Raise;
      End "PR_FANGZAHLEN_TW_SYNC_SK";

  • Trigger does not work after client upgrade to 8.1.7

    I use a simple trigger to keep a table in three databases synchronized
    all worked fine with client 8.0.5 server 8.1.6.
    Now we are testing client 8.1.7 because another application needs it.
    The front end application is in vb (third party)accessing the db via
    odbc.
    the trigger looks like this:
    and I have two database links for mcct and mcc
    TRIGGER copy_ap
    after insert or update on aptabelle
    for each row
    begin
    if updating then
    update aptabelle@mcct set
    apraum = :new.apraum,
    apmemo = :new.apmemo,
    apfree = :new.apfree,
    apnetadress = :new.apnetadress,
    apkhfarefnr = :new.apkhfarefnr
    where aprefnr=:new.aprefnr;
    update aptabelle@mcc set
    apraum = :new.apraum,
    apmemo = :new.apmemo,
    apfree = :new.apfree,
    apnetadress = :new.apnetadress,
    apkhfarefnr = :new.apkhfarefnr
    where aprefnr=:new.aprefnr;
    else
    insert into aptabelle@mcct
    ( APREFNR, APNAME, APRAUM, APMEMO,
    APFREE, APNETADRESS, APKHFAREFNR )
    VALUES
    (:new.aprefnr,:new.apname,:new.apraum,
    :new.apmemo,:new.apfree,:new.apnetadress,:new.apkhfarefnr);
    insert into aptabelle@mcc
    ( APREFNR, APNAME, APRAUM, APMEMO,
    APFREE, APNETADRESS, APKHFAREFNR )
    VALUES
    (:new.aprefnr,:new.apname,:new.apraum,
    :new.apmemo,:new.apfree,:new.apnetadress,
    :new.apkhfarefnr);
    end if;
    end;
    Now after the update I can still get the trigger doing it's job when
    i do a manual update with toad or sql*plus.
    But if the change is done in the vb front end application I get an
    error and I can't save or make any changes at all.
    I updated the odbc driver to 8.1.7.6 but that did not solve the
    problem.
    Is there an default session limit, connection limit introduced as a
    default with 8.1.7 that could keep this trigger from running?
    Or is there a mistake and the 8.0.5 client just did not bother?
    Why can the local client version influence a trigger running on the
    server anyways?
    Any suggestions where to search?
    thanks
    alex

    It's neither an odbc nor an oracle error message.
    It's just a window with Error/Warning in the title bar and the Text "Error while saving"
    with an Ok Button.Seems you are using windows ...
    How is the trigger run when it's called from the application.
    One thing I noticed is a change in tnsname.ora the three databease we use were just called mcc, mcct and mccp
    now they are called mmc.world an so on
    In the odbc config I have to use these names, but if I create the database links with .world they don't work.
    I also have to use the new names for login in SQL*Plus while the database links don't work with the new scheme.
    As I said the whole thing works in pure sql.Just an idea. Maybe your new odbc-middleware makes a read-after-write, thats a select to check if the update was ok. This will fail since you change the updated values in the trigger.
    But it should be possible to switch the read-after-write off via configuration.

Maybe you are looking for

  • Catalog codes not getting displayed in Field- QS41

    During my customisation activity, codes of catalog profiles are not getting displayed in SAP screen. Field for codes are showing as blank grey area in QS41 Tcode. If I try creating same codes again, system throwing error saying "key for entry is exis

  • Converting DVD videos to iPod format for iPod 30GB 5th generation?

    I would like to convert DVDS to iPod format so I can view them on my new iPod? Can someone help me with a how to list? I have located many PC or windows applications for making the conversion ( free downloads) but what do we use if we are mac users (

  • Do non-US english keyboards work properly under ios7 on an ipad4?

    Does anyone know if non-american english bluetooth keyboards work properly under ios7 on the iPad 4? I figure that the results will probably be similar to an iPhone 5s running iOS 7 which is one of a couple reasons why I still have ios6 on my iPad (i

  • Implementation issues in sap/bw

    Hi,    This is srinivas can any one help me in telling what type of issues we will face in implementation project and can any one can send some scenario on cube and ods and multi-provider and infoset. please send me  some issues in transporting  and

  • Is is possible to shuffle a playlist?

    have a 30GB color iPod, have several playlists, but it appears that the shuffle function only works on my entire library (really don't want to mix classical, country, and rock). is it possible to shuffle a playlist? got this new 3 days ago, just gett