Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Record is out of range
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP
Database:
Visual FoxPro
Divers
Thread ID:
01173246
Message ID:
01173277
Vues:
10
>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,

Thanks a lot for your reply. This is actually not my code, I'm just trying to make it work. Basically, originally the table is in particular order and it's scanned while code = lcCode FOR some criteria. In the middle of the scan loop there is another procedure called that sums records from the same table using different order. Then I restore the order and the record pointer.

However, I found, that my table doesn't have an order set at the moment of this error, which is strange, since I have SET ORDER TO 1 in the loop...
If it's not broken, fix it until it is.


My Blog
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform