Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Why SCAN does not EXIT?
Message
From
15/08/2002 08:42:11
Walter Meester
HoogkarspelNetherlands
 
 
To
15/08/2002 08:10:31
General information
Forum:
Visual FoxPro
Category:
The Mere Mortals Framework
Miscellaneous
Thread ID:
00689830
Message ID:
00689909
Views:
32
Ulises,

So the problem is in the following section.
SELECT TABLE2
LOCATE FOR idSTD=TABLE1.idSTD
REPLACE OWE WITH TABLE1.OWE
There could be several reasons:
1. TABLE2 is involved in a relation (SET RELATION) with TABLE1, so the LOCATE does change the record pointer in table2
2. The REPLACE triggers a procedure that changes the record pointer in table 2.

3 ... ?

The only way you can determine the cause is by STEPping through your code and see what is happening after each command. so, ADD a SET STEP ON before the SCAN, Open the two tables in a browse window and step through the code.

Walter,




>This works fine:
>
>Select Table1
>Scan FOR owe <>0
>Endscan
>
>It goes through all the records and exits when reaching the end of the table. So it looks like the problem is when SELECTing TABLE2 and working with it. Would this mean that the index on TABLE2 is corrupted? If so, how to fix it?
>
>TIA
>
>Ulises
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform