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:
01173294
Views:
7
Hi Terry,

Here is the piece of code at the very end
SELECT comision
    SET ORDER TO 1
    GOTO m.iRec && Return back to the record
    WAIT WINDOW "Return to the " + TRANSFORM(m.iRec) + " Current Order is " + ORDER() nowait
    
    IF ccomish#0 AND Com_Rep.DATE<=m.Date2
** Nadya Nosonovsky 11/29/06
        IF PAYMENT <> 0
            REPLACE NEXT 1 comision WITH m.ccomish, paid_date WITH m.mmD, ;
            rate WITH comision*100/PAYMENT
        ELSE
            REPLACE NEXT 1 comision WITH m.ccomish, paid_date WITH m.mmD, ;
            rate WITH 0
        ENDIF
    ENDIF
ENDSCAN
I added a check for Payment <>0 because I was getting numerical overflow error. In any case, it should not affect the scan loop. However, I'm getting an error on the ENDSCAN command and when I check iRec and recno in debug they don't match and order for comision table is empty, though wait window still shows right info.

The only other problem with the replace I see, that it tries to update Rate field based on just updated Comision field.

But why this should be relevant?

I'm completely puzzled and don't know how to fix the problem... Why the order is being re-set for Comision table? There is no code to set it to nothing...
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