Opening/Closing form and then executing a query...help!!!

From: D. Shah <dipen_at_dcs.rhbnc.ac.uk>
Date: 1998/02/01
Message-ID: <6b0i42$29a$1_at_us1.rhbnc.ac.uk>#1/1


I am a novice ORACLe user.
[Quoted] I am experiencing the following problems with SQL*Forms 4.5. I would be extremely greatful if anyone can help solve them!

Problem 1


I have the following code:

if :blk_select.equipment = '747'

   then

      IF id_null(find_form('seat_747')) THEN
         Open_Form('seat_747'); 
         if :blk_select.class = 'F' /* first class */
            then
	       go_block('blk_first');		
	       execute_query; 
         end if;
      ELSE
         Go_Form('seat_747');
         if :blk_select.class = 'F' /* first class */
            then
	       go_block('blk_first');		
	       execute_query; 
         end if;
      END IF;

end if;

The code's objective is to:

1) Move to form 'seat_747'
2) Move to block 'blk_first'
3) Execute_query in block 'blk_first'

Steps 2 and 3 aren't working! Can anyone see what I'm doing wrong?

Problem 2


Similarly, I have a procedure:

PROCEDURE assign_first_seat IS
BEGIN
   if :global.seat_id is null

      then 
         insert into seat_assign (seat_id, segment_id, passenger_id,
seat)
                values (seatseq.nextval, :global.segment_id,
:global.passenger_id, :global.seat);
      else 
         update seat_assign
         set seat = :global.seat
         where seat_id = :global.seat_id;
   end if;
   commit;
   close_form('seat_747');
   execute_query;
END; Its objective is to:
1) Commit changes (do I need 'commit' statement at all?)
2) Close the form
3) Do an execute_query in the calling form.

NONE of these steps are working! Can anyone see what I'm doing wrong?

Many thanks in advance for all your help!

Best Regards
Dipen Received on Sun Feb 01 1998 - 00:00:00 CET

Original text of this message