Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
REPLACE ALL doesn't respect active index
Message
From
02/04/2009 11:45:03
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Troubleshooting
Title:
REPLACE ALL doesn't respect active index
Environment versions
Visual FoxPro:
VFP 9 SP2
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01392753
Message ID:
01392753
Views:
113
This may be a surprise.

xbase commands should respect an active index,
but it is not always true.

With REPLACE ALL the write process run with the RECNO() order.
CLEAR

CREATE CURSOR aa  (x i,order I)
INSERT INTO AA VALUES (7,1)
INSERT INTO AA VALUES (5,2)
INDEX ON X TAG XX

* look the screen output
REPLACE ALL X WITH GETV(X)

* then this is not possible
REPLACE ALL order WITH _TALLY+1
BROWSE
* workaround
LOCATE
REPLACE REST order WITH _TALLY+1
BROWSE

PROCEDURE GETV(V)
? M.V
RETURN M.V
Next
Reply
Map
View

Click here to load this message in the networking platform