Solved

Handling Message

Posted on 1998-05-27
1
139 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
ID: 1348041
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

Optimizing Cloud Backup for Low Bandwidth

With cloud storage prices going down a growing number of SMBs start to use it for backup storage. Unfortunately, business data volume rarely fits the average Internet speed. This article provides an overview of main Internet speed challenges and reveals backup best practices.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
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…
This Micro Tutorial will give you a basic overview how to record your screen with Microsoft Expression Encoder. This program is still free and open for the public to download. This will be demonstrated using Microsoft Expression Encoder 4.
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…

773 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