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

From: Jomarlen <jomarlen_at_aol.com>
Date: 1998/02/01
Message-ID: <19980201213400.QAA25874_at_ladder02.news.aol.com>#1/1


>I am a novice ORACLe user.
>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?
>
>

Open_Form and Go_Form immediately pass
control to the opened/called form.

You need to handle steps 2 and 3 in that form. You probably need to use a When_Window_Activated trigger.

John Received on Sun Feb 01 1998 - 00:00:00 CET

Original text of this message