Thanks Paul and Tracy.   I'll check those out!

I've did a multi-threaded app in my last job, I just haven't looked into it for 
this project yet as it was a 'get it done yesterday' system that I didn't have 
a lot of time to test and went live yesterday.    It only runs once a day, and 
I am the one who is running it for now so I can monitor it...

Lou


-----Original Message-----
From: profoxtech-boun...@leafe.com [mailto:profoxtech-boun...@leafe.com] On 
Behalf Of Tracy Pearson
Sent: Wednesday, December 28, 2011 6:39 AM
To: profoxt...@leafe.com
Subject: RE: Not Responding

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


[excessive quoting removed by server]

_______________________________________________
Post Messages to: ProFox@leafe.com
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/0bac2c1927422843b2c121c8b41684af0f318...@dfw1mbx24.mex07a.mlsrvr.com
** 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