Solved

Handling Message

Posted on 1998-05-27
1
137 Views
Last Modified: 2010-04-06
My question is next.
I have a procedure in which I create proces. This proces call oracle loader program which loads data in the oracle database. So this can take a lot of time. But when I create a proces I don't won't to wait until this process isn't over.
When I chose another table to fill with data I again call this process with different parameters. And so it can be many times. So several process running at the same time.
And now a question.

How can I determine which process is finished and when, because I need a time. This time is needed to update to oracle database.
0
Comment
Question by:p_uros
1 Comment
 
LVL 1

Accepted Solution

by:
ssite earned 100 total points
Comment Utility
If you don't need the exact milisecond, here's what I would do :

Whenever you use createprocess, the final parameter is the process information :

use proc.hProcess and you know the process id of the process you ran.

Store all these in an array or list and then use a timer to check every second or two, which process ID's are still alive. You use GetExitCodeProcess(processarray[index], @Exitcode)

if ExitCode is not STILL_ACTIVE, the process finished in the time between the last check and now. Don't forget a flag to prevent you from doing the timer event twice at the same time.

Hope this helps.


0

Featured Post

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
This video discusses moving either the default database or any database to a new volume.

763 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

7 Experts available now in Live!

Get 1:1 Help Now