PL/SQL Block, Cursors, & DOS

From: Robert Fleisig <rflei_at_bssv01.hac.com>
Date: 23 Jun 1994 00:15:33 GMT
Message-ID: <2uak75$27r_at_hacgate2.hac.com>


In advance, I apologize for the length of this post. I have been relegated to develop an application on PC/DOS w/ Oracle 6.0.36 and PL/SQL 1.0 and SQL*Forms 3.0.

In the code for a key-startup trigger, when :global.n_main_choice = 3, processing flows correctly, a cursor is openned, and the form is correctly filled w/ records. But when not :global.n_main_choice = 3, a cursor is openned, and the form is filled w/ records, each record overwriting the preceding record.

It appears that the packaged procedure next_record malfuctions, but only conditionally. I have tried replacing next_record w/ down and insert_record, but to no avail. What gives?

declare
  cursor VMESE_FS_CUR is

     . .
  cursor FW_FS_CUR is

     . .
 VMESE_FS_REC VMESE_FS_CUR%rowtype;
 FW_FS_REC FW_FS_CUR%rowtype;

     . .
IF :GLOBAL.N_MAIN_CHOICE = 3 THEN
  . .
END IF; /* WHERE :GLOBAL.N_MAIN_CHOICE = 3 */ IF (:GLOBAL.ITEM = '0020AE') THEN
  open FW_FS_CUR;
    <<FW>>
    loop
    fetch FW_FS_CUR into FW_FS_REC;
    exit when FW_FS_CUR%NOTFOUND;
:one.item_select := null;
:one.EXT_ITEM := FW_fs_rec.EXT_ITEM;
:one.capacity := FW_fs_rec.capacity;
    next_record;
    end loop FW;
    close FW_FS_CUR;
    go_record(:global.save_cursor_record); ELSE /* WHERE NOT (:GLOBAL.ITEM = '0020AE') */     open VMESE_FS_CUR;
    <<VMESE>>
    loop
    fetch VMESE_FS_CUR into VMESE_FS_REC;     exit when VMESE_FS_CUR%NOTFOUND;
:one.item_select := null;
:one.EXT_ITEM := VMESE_Fs_rec.EXT_ITEM;
:one.capacity := VMESE_Fs_rec.capacity;
    next_record;
    end loop VMESE;
    close VMESE_FS_CUR;
    go_record(:global.save_cursor_record); END IF; /* WHERE :GLOBAL.ITEM = '0020AE' */ <<END_EARLY>>
first_record;
go_record(:global.save_cursor_record );
end;

Bob Fleisig Hughes Data Systems bflei_at_hds.hac.com /*** All Standard Disclaimers ***/ Received on Thu Jun 23 1994 - 02:15:33 CEST

Original text of this message