Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Scope vs FOR/WHILE in commands
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP2
Network:
Windows 2008 Server
Database:
Visual FoxPro
Application:
Desktop
Miscellaneous
Thread ID:
01531561
Message ID:
01531562
Views:
55
>Hi Gang!
>
>Question....
>
>I've come across some code that I need to speed up and was wondering about this......
>
>in the code below is an ALL scope along with the FOR......
>
>Will the ALL be ignored or will it cause a slowdown in the processing of the FOR ????
>
>
>				*TMN 06/21/2011 - remove claim records if a Prefill so we don't have duplicate claim records
>				IF Thisform.p_FormType = 3  && Prefill only!
>					DELETE ALL ;
>					FOR (ALLTRIM(STR(rx_claim.rx_no)) = ALLTRIM(STR(rx.rx_no))) ;
>					AND (ALLTRIM(STR(rx_claim.refill_no)) = ALLTRIM(STR(rx.refill_no))) ;
>					AND rx_claim.statuscode = -1 IN rx_claim
>					Thisform.m_save(.T.,"rx_claim")
>				ENDIF
>				*TMN 06/21/2011
>
>
>
>Thanks!

ALL is ignored and I doubt that when you remove it this will speed the process.

try:
IF Thisform.p_FormType = 3  && Prefill only!
   DELETE FROM  rx_claim;
          WHERE rx_claim.rx_no     = rx.rx_no     AND; && WHY ALLTRIM(STR(????))????
                rx_claim.refill_no = rx.refill_no AND;
                rx_claim.statuscode = -1
ENDIF
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform