Hi!
It is a limitation of VFP by design, and it is related not to SET DELETED option, but to 'table buffering mode' - CURSORSETPROP("buffering", 5) command.
I solved this problem partially:
if getnextmodified(0)<>0
&& if data changed, we cannot drop table buffering because it will update view's data automatically.
= messagebox('Cannot sort records when they were changed. Please save changes and try again!')
else
CURSORSETPROP("buffering", 3) && drop table buffering to row buffering
* sort table using INDEX command
CURSORSETPROP("buffering", 5) && return buffering again
endif
In addition, I do not delete index immediately when sorting no longer used. When user sorts again, I don't reindex table but use just existing index. This reduces the chanse when users will see above message box.
>Hi,
> How do I INDEX my cursor if SET DELETED OFF when buffering?
>
>I get error with the following code:
>
>
>SET DELETED OFF
>SET MULTILOCK ON
>
>USE mytable AGAIN SHARED
>CURSORSETPROP("buffering", 5)
>
>SELECT f1, f2 ;
>FROM mytable ;
>WHERE f1 = "111" ;
>INTO CURSOR mycursor
>
>INDEX ON f1 TAG f1 OF mycdx.cdx
>
>
>
>
>Any ideas?
>
>Thank you
Vlad Grynchyshyn, Project Manager, MCP
vgryn@yahoo.comICQ #10709245
The professional level of programmer could be determined by level of stupidity of his/her bugs
It is not appropriate to say that question is "foolish". There could be only foolish answers. Everybody passed period of time when knows nothing about something.