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

    Question Unanswered: Oracle Cursor NOT Populating Records

    Hi All

    I have two blocks, one is Master for StockRecv_Master and Second is Detail Block for Stockrecv_Detail. Master Block has it's Own ID StockRECV_ID. Master Block is populating by LOV which is assigned to PO_ID (Purchase Order ID). PO_Master & PO_Detail are separate tables for PO records.

    I am trying to execute a cursor with When-Validate-Item Trigger on PO_ID item of Stockrecv_Master block. When a PO is selected then Master Block is populated by LOV from PO_Master table and after that a cursor is opened to fetch records in StockRecv_Detail block form PO_Detail table.

    StockRecv_Master is populated by LOV.
    StockRecv_Detail is not populated by Cursor. Code for Cursor is as Follow

    Declare
    Cursor PODETAIL is
    Select PD.PROD_ID, PM.PROD_NAME, PD.UNIT_ORDERED, PD.UNIT_PRICE, PD.DISCOUNT
    from PO_DETAIL PD, PRODUCTMASTER PM
    WHERE PD.PROD_ID = PM.PROD_ID
    AND PD.PO_ID = :stockrecv_master.PO_ID;

    Begin

    ----go_block('stockrecv_detail');

    Open PODETAIL;
    while PODETAIL%FOUND
    Loop
    Fetch PODETAIL
    into :stockrecv_detail.prod_id, :stockrecv_detail.prod_name,
    :stockrecv_detail.unit_ordered, :stockrecv_detail.unit_price,
    :stockrecv_detail.discount;
    next_record;
    exit when podetail%notfound;
    end loop;
    close PODETAIL;
    End;

    I am using Oracle Developer Forms 6i, Database 10g (10.2) and windows XP Pro.

    Thanks in Advance
    Thunder2777
    Last edited by Thunder2777; 10-28-10 at 08:55.

Posting Permissions

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