Results 1 to 6 of 6
  1. #1
    Join Date
    Sep 2010
    Posts
    10

    Question Unanswered: Oracle Form Navigational Problem

    Hi All

    I am developing a from for sales. It consists of 3 database blocks. 1st one is Master Block, 2nd one is Detail1 Block and 3rd is also Detail2 Block.
    Relationship is as follow Master -> Detail1, Master -> Detail2
    I am using Trigger When Create Record at Master Block for creation of new record and assigning new Sale No in Master Block.
    There is NO problem when there is no discount (which is the item of Detail2 block) and I save the form then it is OK (when user do not enter the data in discount item of Detail2 block).

    The problem is when there is discount (which is the item of Detail2 block) and after entering discount, User SAVE the form then it saves the 3 records (Master, Detail1 and Detail2) and new Sale No is assigned in Master Block,
    but after that cursor still remains in Detail2 item (Discount) instead of going to Customer item in Master block which is next item after Sale No.

    The Cursor should be in Customer item of Master Block instead of Discount item of Detail2 block.

    I am using Oracle Developer 6i, Database 10g (10.2) on Windows XP Professional.

    Thanks in Advance
    Thunder2777

  2. #2
    Join Date
    Jan 2004
    Location
    Croatia, Europe
    Posts
    4,094
    Provided Answers: 4
    KEY-COMMIT trigger:
    Code:
    COMMIT;
    
    GO_ITEM('master_block.customer_item');

  3. #3
    Join Date
    Sep 2010
    Posts
    10

    Question Oracle Forms Navigational Problem

    Once Again Thanks for the perfect solution.

    One More Question

    When I Run the Form, at Form level in When New Form Instance Trigger,
    I have used Execute_Query and Last_Record. Everything Runs fine here.

    But One thing is missing and that's the Name of the Customer
    (which is a Display Item in Master Block) but Customer ID is displayed.
    There is separate table for the customer. Only Customer ID is stored in
    Master block table.

    I want to Display the name of Customer when the query is executed by matching the Customer ID and then fetching the relevent name from the customer table.

    I have tried Post Query and When Validate Item but only got error (ORA-01422).

    Thanks in Advance
    Thunder277

  4. #4
    Join Date
    Sep 2010
    Posts
    10

    Wink

    Dear All

    The POST-QUERY at Block Level is working fine now.

    I don't understand why it does not work previously.

    Thanks to ALL especially LittleFoot.

    Thunder2777

  5. #5
    Join Date
    Jan 2004
    Location
    Croatia, Europe
    Posts
    4,094
    Provided Answers: 4
    I don't know what you did in the meantime, but - if you did "nothing", then you can expect ORA-01422 again (it is the TOO MANY ROWS error) - query is written in a way that it doesn't return a single value into a form item. For a certain customer ID, that might happen again unless you fix (fixed) it.

    As of triggers you used: WHEN VALIDATE ITEM is needed when creating new records (or updating existing ones), POST-QUERY is used while querying existing data. So - no objections here, that's exactly what you needed to use.

  6. #6
    Join Date
    Sep 2010
    Posts
    10

    Wink Oracle Forms Navigational Problem

    Dear Little Foot

    I have been trying to fix this problem and logically Post Query should give me the required result but I don't know what happened wrong.
    I shut down DB and Developer. Shut Down Laptop yesterday.

    Restarted it again next morning (today) and it is giving me required results as I have mentioned in my post.

    Anyway, All I want is the result which I have it now.

    Thanks for the explanation of triggers.

    Kind Regards
    Thunder2777

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •