>>>>Anyway, the problem is that Delete sometimes places you at eof() already, so you can't Skip without an error. I was trying to use code such as yours, originally.
>>>
>>>Can you give me an example? I NEVER saw a case when the DELETE (with no other clauses) moves the record pointer. And I would really want to see it if this can happen. This would be a HUGE bug. I also assume that you don't have a stored procedure/RI that plays with the rec pointer.
>>>
>>That's what I thought, too. It occurs with a view and buffered table, but only sometimes when deleting last record, under network shared situation for table...but I don't have the code here at home...I'll have to check it some more next week, but the code I gave does fix the problem...
>
>I know it fixes the problem. But it looks more like an workaround (see also my reply to Allan). I would like to know/determine the exact conditions when this can happen. It never occured to me in any FoxPro version and I would like to be aware of it. I just hate this type of bugs. :)
>
More Info: Here's the code the Wizard now has for its Delete button:
delete
if not eof()
skip 1
else
if eof() and not bof()
skip -1
endif
endif
This leads me to suspect that it is (now?) possible to hit eof() on a delete. Why else would MS vfp coders do it this way?
The Anonymous Bureaucrat,
and frankly, quite content not to be
a member of either major US political party.