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:
01173449
Views:
8
Hi Randall,

Just wanted to point out, that this is an old application converted and it uses old style of indexes INDEX ON somefield TO someindex.idx instead of
index on somefield TAG Something.

You probably would not encounter a problem at all using structured indexes.

Also I guess my record is out of range problem was mostly caused by bad indexes. I did switch to array solution as a cleaner alternative and I also re-indexed my tables.

I had this problem with local version of data and don't have a problem with the old code in production, so I really think the problem is related with the bad indexes...

BTW, I found
select sum(..) from sometable where somecondition into array laArr doesn't create an array if the condition is not met in VFP8. Is the behavior different in VFP9?

so I just put cRate = evl(laArr[1],0) (don't ask me about cRate for the numerical value, I didn't create such names)

>Hi again, Naomi.
>
>>Ok, I think the problem is in using non structured indexes.
>>
>>Somehow this command
>>IF NOT USED("Sum_Commission")
>>	USE Comision again alias Sum_Commission in 0 INDEX com_inv
>>ENDIF
>>
>>changes order in already opened Comision. I guess you can not use the same table twice with the same Index file.
>
>Oh, really?! Thanks for finding the problem, Naomi. Going to have to
>save this thread and make sure we avoid that particular problem.
>
>>I think I may better try the array solution then.
>
>Yep. Sounds like a good thing to use. Another good thing about
>the array solution is that it should speed things up a bit. OTOH,
>since most everything we do with VFP is I/O bound, God only knows
>if it will make that much of a difference. Hey...as long as it
>works :^)
>
>Regards,
>
>Randall
If it's not broken, fix it until it is.


My Blog
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform