Hi, some further clarification. I should have mentioned, that I want the
user to be able to close the program without the background database job
terminating. So I understand this rules out threads? I need to run some
Windows command, to execute my dll, with a "return now" type switch, so I
get control back immediately.

Thanks. 

>  -----Original Message-----
> From:         JOLLIE, Dave [THL]  
> Sent: Monday, 3 March 2003 07:57
> To:   '[EMAIL PROTECTED]'
> Subject:      How do I run a background job
> 
> Hi
> 
> I have a dll which users run to prepare an extract file from a database.
> When they have entered the form data and run the extract, I then want to
> do some database updates which take a few minutes. I don't want the user
> to have to wait, but instead be returned to the form, where they can do
> another extract or leave the program.
> 
> So what I want to do, is kick off a background task, which will do the
> database updates, passing in the necessary parameters. This could be a
> hidden task, or one that appears on the task bar, just as long as the user
> has control back to get on with another extract run in the same program.
> I've made a new dll and done a call to it, to do the database updates, but
> control is taken away while the called dll runs. How do I stop this
> happening and make it a separate process? Must I use an exe, or is it a
> switch on the dll? Do I have to use multi-threading?
> 
> Any ideas appreciated.
> 
> Cheers
> 
> Dave Jollie
> Software Developer BOA IT
> 09 368 4259 ext 6231
> 
> The information contained in this mail message is confidential and may
> also be legally privileged. If you are not the intended recipient, please
> note that any use, dissemination, further distribution, or reproduction of
> this message in any form what so ever, is strictly prohibited.  If the
> mail is in error, please notify me by return E-mail, delete your copy of
> the message, and accept my apologies for any inconvenience caused.
> 
---------------------------------------------------------------------------
    New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
                  Website: http://www.delphi.org.nz
To UnSub, send email to: [EMAIL PROTECTED] 
with body of "unsubscribe delphi"
Web Archive at: http://www.mail-archive.com/delphi%40delphi.org.nz/

Reply via email to