1. Get rid of all advertisements and get unlimited access to documents by upgrading to Premium Membership. Upgrade to Premium Now and also get a Premium Badge!

i cant able to solve it, please giv your suggestion

Discussion in 'Oracle Forms and Reports' started by mohammedasif, Jan 8, 2014.

  1. mohammedasif

    mohammedasif Active Member

    Messages:
    12
    Likes Received:
    0
    Trophy Points:
    100
    I have doubt in oracle forms 10g
    i have 2 tables t_bill1 and t_stock, i have developed t_bill1 in frontend and from their the entry will be saved into the database......
    T_bill1 t_stock
    prod_id prod_id
    prod_name prod_name
    qty qty

    my question is that...
    If i enter my quantity as 5 in t_bill1 then it should automatically reduce 5 items in the stock table......................

    I used post_insert trigger
    begin
    update t_stock
    set qty=(qty-:t_bill1.qty)
    where prod_id=:t_bill1.prod_id;

    end;

    please give me response guys
     
  2. sambuduk

    sambuduk Forum Advisor

    Messages:
    242
    Likes Received:
    73
    Trophy Points:
    455
    Location:
    Hyderabad , Telangana
    Hi

    Try with database trigger on t_bill1 table..

    Regards
    Sambasiva Reddy.K
     
  3. zargon

    zargon Community Moderator Forum Guru

    Messages:
    2,347
    Likes Received:
    348
    Trophy Points:
    1,430
    Location:
    Aurora, CO
    Using a database trigger defeats the purpose of coding the update in the form and doesn't really solve the problem.


    How are you checking if the update succeeded? If autocommit is not enabled for the form the update WILL execute but the results won't be visible to any session other than the one which performed the update. Please describe how you are checking on this transaction.