Information générale
Catégorie:
Codage, syntaxe et commandes
>>>>>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
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement