Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Record is out of range
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01173246
Message ID:
01173270
Views:
9
Hello Naomi,

>I have a table set in the particular order and then a
>
>I'm doing a SCAN on the table with some FOR and WHILE conditions.

I take it that you're doing the SCAN based on some criteria. What is
this criteria, and is it being met?

>In the beginning on the scan I'm saving recno, then there are some calculations
>involving this table, then I restore order on this table and goto saved recno.
>I also update some fields in this table that don't participate in FOR/WHILE.

This last line that you wrote. You could be changing/advancing the record pointer,
yet SCAN thinks nothing has changed, and that you're still on the same record; therefore,
your program might be trying to seek past EOF, in which case SCAN would
return the error you describe.

Or, your search criteria is not being met at all, and SCAN is letting you
know (in it's own way) that nothing was found.

>I'm getting record is out of range on the ENDSCAN command.
>
>Do you know why I'n having this problem and how can I fix it?

It sounds like you are inadvertently changing the record pointer,
and SCAN is getting confused. Either that, or your criteria is
not being met.

Hope this helps,

Randall
--
Randall Jouett
Amateur/Ham Radio: AB5NI
I eat spaghetti code out of a bit bucket while sitting at a hash table! Someone
asked me if I needed salt, and I said, "I'm not into encryption." :^)
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform