Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
INDEX ON failed if SET DELETED OFF in buffering
Message
From
03/01/2001 07:44:21
 
 
To
03/01/2001 06:44:25
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00458829
Message ID:
00458845
Views:
17
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
>&& ERROR - 1579 Command cannot be issued on a table with cursors in table buffering mode.
>
>
>
>Any ideas?
>
>Thank you
Vlad Grynchyshyn, Project Manager, MCP
vgryn@yahoo.com
ICQ #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.
Previous
Reply
Map
View

Click here to load this message in the networking platform