Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Replace command throws me to eof
Message
From
24/10/2007 12:22:58
 
 
To
24/10/2007 11:28:58
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Environment versions
Visual FoxPro:
VFP 7 SP1
OS:
Windows XP SP2
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01262987
Message ID:
01263165
Views:
13
Now here's sthe thing:

- As I said before, Day_Op is part of the sort order.
- I changed the order to another tag that doesn't refine on Days_Op.
- The .BeforeUpdate method, where I put any last-minute twiddles, such as updating LAST_UPD field, et al, before TABLEUPDATEing, is where I now have the Replace of Days_Op. I now have a test to see if it's changed and only replace if it has.
- I made a change to a rec where Days_op is not altered.
- It, of course, skipped the days_op replace and ptr stayed on correct record.
- I made a change to a rec where Days_op IS altered.

[Drum roll]

- the replace of Days_Op DID take place, BUT - the ptr stayed put!!!!!
- This would seem to suggest that having Days_op involved in the Order is what's screwing it up.
- But if Days_Op not changed the WTF!?

- Put the orig order backand as soon as Days_Op is changed (ie I physically alter the toggle buttons) it ends up at EOF

So it seems that REPLACEing the Days_op field, even if it's replaced with exactly the same, throws the ptr off.
So I can't use the orig order tag and trust the form if operating days are changed.

Bummer!

Thanks for the input, guys.

>>>But that should just get your record to be the last record (assuming you're entering a date larger than any other), not EOF(). Try with an older date - i.e. not today, but a date less than the latest date in the table, that should set your record as not the last.
>>
>>DAYS_Op is a 7 char field to denote what days the Journey runs, not a date, as I explained in another fork. If every day then it will hold "MTWTFSS". If the bus doesn't run, say, wed and thu then it will be "MT--FSS".
>
>Seems to be this one runs only mid-week, i.e. it's a "--WTF--" :).
>
>
>>>BTW, are you sure it's eof("infobase")? Could it be something else (a related table, perhaps) is at eof()?
>>
>>I have the infobase up in a browse whilst tracing. As soon as the repl day-op is executed - ZAP - off to last rec.
>
>Spare me hunting down the rest of the thread - what's the key expression for the current tag? Could it be that it's somehow empty for other records and filled for the current - so it jumps to the bottom (bottom or eof() - the difference makes a difference).
- Whoever said that women are the weaker sex never tried to wrest the bedclothes off one in the middle of the night
- Worry is the interest you pay, in advance, for a loan that you may never need to take out.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform