Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
For next error
Message
 
To
28/05/2011 19:01:15
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Miscellaneous
Thread ID:
01512171
Message ID:
01512247
Views:
59
Grady, I do not understand your code, it seems that you will end up updating just one record in the Results cursor/table? Also, it is better (IMO) to use REPLACE IN instead of moving back and forth the selected area. Lastly, if you have a relationship between Entity and Results the whole thing can be done with one UPDATE - SQL command without the need to have a loop at all, but for starters I would change that code to something like this:
SELECT Entity
SCAN FOR UPPER(ALLTRIM(WordUsed)) $ UPPER(Caught2)
    REPLACE Entity WITH Entity.WordUsed IN Results && This does not make much sense to me
ENDSCAN
[Update]
Sorry about not disregarding your post, missed that part.
[/Update]

>What causes this to happen? (Missing line of code) Fixed - please disregard this post.
>
>SELECT entity
>FOR TheCount = 1 TO entitycount
>GOTO TheCount First pass error occurs here RECORD IS OUT OF RANGE - Yet there is data in the table and there is a record with text in the first position. no index
>IF UPPER(ALLTRIM(WordUsed)) $ UPPER(Caught2)
>SELECT results
>REPLACE entity WITH entity.WordUsed
>Select entity *** This line was missing
>? entity.WordUsed && test
>ENDIF
>NEXT TheCount
"The five senses obstruct or deform the apprehension of reality."
Jorge L. Borges?

"Premature optimization is the root of all evil in programming."
Donald Knuth, repeating C. A. R. Hoare

"To die for a religion is easier than to live it absolutely"
Jorge L. Borges
Previous
Reply
Map
View

Click here to load this message in the networking platform