Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Running separate process
Message
De
01/12/2020 13:09:07
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
01677343
Message ID:
01677365
Vues:
46
>>>>>I created a com exe, but still don't get the idea how the process would run without the calling application waiting for the result:
>>>>>loProcess = Createobject("Test.Test")
>>>>>loProcess.Execute()
>>>>>
>>>>>Then it waits until it's finished, but that should not be the case. Do I need to do something else?
>>>>
>>>>It really depends on what the process should do. Personally I used this solution for reporting, sending emails and a few other tasks. The users were really happy to start a report, and be able to continue with their work straight away. As soon as the report finished, it arrived by email.
>>>>If you can give more info, I can see if I can give you some more ideas.
>>>Basically it connects to SQL Server, runs a query, if anything is found it formats the data and creates a table in the temp folder.
>>So the time consuming part is the query itself?
>Yes around 90%. I could not make it async for some reason, it is a query that executes over multiple databases.

Steer and communicate back via Properties (setting task still via method call), fire process on timer checking properties - real asynch in pure vfp is better done with OLE Linking&Embedding, which creates interrupts in calling pocess on completion and opens other can of worms (and was ugly to set up, did that following some doc steps and still took more than envisioned)
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform