Re: "DoEvents" equivalent in Forms 4.5
Date: 1998/01/06
Message-ID: <34b18ba6.30534676_at_news2.dknet.dk>#1/1
On Mon, 05 Jan 1998 14:11:43 GMT, manders_at_mbnet.mb.ca (Michael Anderson) wrote:
>Like YyWong (see "Cancel operation when procedure is running") I have
>the problem where I would like to implement a cancel button that can
>be used while a procedure is running. The problem is I could exit the
>loop if a condition changed, but Forms does not process any events
>until the trigger that is currently running is done. Visual Basic has
>DoEvents which passes control to the operating system, so that events
>such as pressing a cancel button or moving the form can be processed.
>Is there such a command or a way of implementing a similar thing in
>Oracle Forms 4.5?
Several ...
A "simple" is to have a timer event as the communication with the
long-lasting procedure. You submit your procedure through the
queue-manager (DMBS-JOB) or something simular. I've used Reports 2.5
to submit jobs in batch. Then use DBMS_PIPE to communicate with
batch-job.
Unfortunately forms does not support multi-threating - which could
solve the problem very easy. Once the MDI is executing a procedure it
"hangs" until it's done. I'm not sure - as I havn't had the chance to
check it out - but I think this is one of the "problems" solved in
Dev/2000 2.0.
Anyway - it's never a good thing to have resource demanding processing
running on your client. If you need a job to run for instance for 10
minutes - why not free the client and let the server do the job? Then
the user is free to do whatever he/she wants to do - for instance
answer the phone and lookup things in other applications - or the same
application. This can only be done by usage of batch-like jobs - for
instance DBMS_JOB running a storeprocedure - called when the user
submits the process. Then to give feedback both on the process but if
the user requests cancellation - you use either a simple table or
DBMS_PIPE.
Regards
Peter H. Larsen (petlars_at_pip.dknet.dk)
Oracle Consultant (not affiliated with Oracle)
Received on Tue Jan 06 1998 - 00:00:00 CET