Ali İhsan Türkoğlu wrote:
> I should write a VFP program that work on server. Continuously, This program
> will look a vfp table, if new records added, make some jobs.
>
> User should start and stop this program.
>
> Question is: How can I escape from an endless loop, when user clicks the
> stop buton on my vfp form?
>
>  
>
> Is this type program consume much CPU time due to endless do while loop?
>
>  
>
> Thanks for all help.
>
>  
>
> Ali Ihsan
>   

Hi Ali,

You can design it WITHOUT loops, and as such, it will run better. Do 
this: as user's add records to the VFP server, keep track of the last 
received (or processed) record's AutoInc Primary Key field on your local 
machine. Then the next time your timer or whatever process kicks off, 
you look for records BEYOND that last processed key. Hence, you never 
loop through records you've already processed.

I did this for a messaging app years ago and it worked great!

hth,
--Michael

-- 
Michael J. Babcock, MCP
MB Software Solutions, LLC
http://mbsoftwaresolutions.com
http://fabmate.com
"Work smarter, not harder, with MBSS custom software solutions!"



_______________________________________________
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
** 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