Re: Form 4.5 question
Date: 1997/11/20
Message-ID: <19971120063400.BAA01179_at_ladder01.news.aol.com>#1/1
>Hi,
>
>I have a long running PL/SQL code in a form procedure. The code is
>long running because it contains numerous select statements:
>
>select ... into ... ; --#1
>select ... into ... ; --#2
>select ... into ... ; --#3
>..
>select ... into ... ; --#10
>
>Between the selects I have the opportunity to do anything in PL/SQL.
>
>What I need is a Cancel button on my form to interrupt the procedure,
>during or between the select statesments. I know, it is impossible.
>
>So my question is: is there any way of receiving any kind of
>asynchronous user interrupt or user reaction between my PL/SQL
>statesments?
>
>Thanks in advance,
>
>G
You could use a timer, in combination with 2 other variables. One variable records the state of the 'Cancel' button; the other determines which select statement to run next. If the Cancel button is not clicked, the -when-timer-expired trigger calls a procedure that runs the first select statement. The procedure runs the select statement, increments the variable, and ends. The timer trigger then fires, checking the 'Cancel' button, and calling the same procedure (but now running the NEXT select statement). This repeats until all the statements are done, and the timer is cancelled.
Hope this helps.
DanHW Received on Thu Nov 20 1997 - 00:00:00 CET