Lou Syracuse wrote on 2011-12-28: 
>  I have the same issue with a .NET program, so it is not limited to VFP.
It calls a StoredProc in SQLServer that takes an hour to run.
>  
>  I was thinking about creating a 'job' table.. get the ID and pass it
along with the parameters to the Stored Proc from a second EXE (called from
the first with its visible property set to false).  The 2nd exe calls the SP
then updates a completed field in the job table... meanwhile the original
program is sitting in a form with a timer that checks that flag every 60
seconds or so and when it is set does a query to pick up and delete the data
from a 'results' table based on that job id.
>  
>  Clear as mud?  It seems like overkill for a process that we only run once
a day though.   Parameters need to be entered so it can't be automated.
Would have been better (and much easier to debug) doing the work in .NET,
but the IT Manager (non-programmer) said to do it in an SP so it can utilize
his new/expensive/fast server.  Someday when I have time I'm going to code
it in .NET to see if there is really that big of a speed difference. I think
I have some time opening up in November 2014...
>  
>  Lou
> 
> 

Lou,

In .NET you have the ability to start a worker thread. Which could raise an
event in the UI thread to signify the completion.
http://msdn.microsoft.com/en-us/library/7a2f3ay4(v=VS.90).aspx
 and
http://msdn.microsoft.com/en-us/library/aa645740(v=vs.71).aspx

are some examples in C#. 

Tracy Pearson
PowerChurch Software


_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/profox
OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: 
http://leafe.com/archives/byMID/profox/[email protected]
** All postings, unless explicitly stated otherwise, are the opinions of the 
author, and do not constitute legal or medical advice. This statement is added 
to the messages for those lawyers who are too stupid to see the obvious.

Reply via email to