Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Another problem: CONTINUE moves to 1st record.
Message
 
 
To
30/07/2001 17:12:34
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00537487
Message ID:
00537506
Views:
14
This message has been marked as the solution to the initial question of the thread.
I don't know why it's happend but there is a simplier code that does the same
SELECT TABLE_A
SCAN FOR Amount<>0
      STORE Number TO xNbr
      SELECT TABLE_B
      LOCATE FOR Field1B=xNbr
      * To be safe you should check here if the record is found or not
      REPLACE Field2B WITH TABLE_A.Amount
ENDSCAN
If you have an index on Field1B in TABLE_B than even shorter
SET ORDER TO Field1B IN TABLE_B
SELECT TABLE_A
SET RELATION TO Number INTO TABLE_B
SCAN FOR Amount<>0
  IF FOUND("TABLE_B")
      SELECT TABLE_B
      REPLACE Field2B WITH TABLE_A.Amount
      SELECT TABLE_A
  ENDIF
ENDSCAN
>Hi all:
>I have this code:
>
>SELECT TABLE-A
>   GO TOP
>   LOCATE FOR Amt<>0
>   DO WHILE NOT EOF()
>      STORE Amount TO xAmt
>      STORE Number TO xNbr
>      SELECT TABLE-B
>      LOCATE FOR Field1B=xNbr
>      REPLACE Field2B WITH xAmt
>      SELECT TABLE-A
>      CONTINUE &&  At this point, CONTINUE moves to the first record in TABLE-A
>      IF EOF()
>         EXIT
>      ENDIF
>   ENDDO
>
>According to HELP, CONTINUE should resume the search starting at the current record, once TABLE-A is reselected, but instead, it goes to Record 1.
>Is this another bad case of bad reindexing?
>Thanks in advance for your time.
>Ulises
--sb--
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform