Eurico wrote:
HiWhich way is better ? Or are they the same... And it's inside a Begin Transaction ... End Transaction. 1. select inventory nChanged = getnextmodified(0) do while nChanged<>0 go nChanged ------ ------ replace qtddisp with ---- ------- tableupdate(0,.t.) nChanged = getnextmodified(0) enddo 2. select inventory nChanged = getnextmodified(0) do while nChanged<>0 go nChanged ------ ------ replace qtddisp with --- ------- nChanged = getnextmodified(0) enddo tableupdate(1,.t.)
I suppose it depends on the behavior you want. Personally, I'd do for option 2, doing a TABLEUPDATE(2,.T.,"v_MyCursor") ONCE after the loop; just seems to me like less I/O (but in actuality, it may be the same); still, it's one less iteration for the loop in that case! ;-) Are you trying to date/time stamp the fields that have changed? Is that what qtddisp is?
--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.

