Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Primary Key
Message
From
04/01/1999 10:17:32
 
 
To
04/01/1999 07:49:32
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Miscellaneous
Thread ID:
00171828
Message ID:
00172407
Views:
25
Federico,

Cool! I just cut this out for my tip book.

>Yes, you can: filter your primary key index on NOT DELETED(), and deleted records won't bother you. However, this has a drawback; since filtered indices won't be used by Rushmore, you will need to add a regular index on the same expression, so your queries can be optimised.
>>>
>>Uhhh! Are you sure about this? My experience is that a deleted record still will not permit a new record with the same primary key to be added to the table irrespective of SET DELETED status.
>
>Yep, it works. Cut and paste this program, and check it for yourself:
SET DELETED ON
>
>CREATE TABLE TryIt FREE ;
>	(MYKEY N(5), MYDATA C(20))
>	
>INDEX ON MYKEY TAG NOTFORUSE CANDIDATE FOR NOT DELETED()
>INDEX ON MYKEY TAG USETHISTAG
>
>INSERT INTO TryIt VALUES (22,"HI THERE")
>INSERT INTO TryIt VALUES (09,"ARE YOU WATCHING?")
>
>DELETE FOR MYKEY=22
>
>INSERT INTO TryIt VALUES (22, "HERE AGAIN")
>Good luck!
Jim Edgar
Jurix Data Corporation
jmedgar@yahoo.com

No trees were destroyed in sending this message. However, a large number of electrons were diverted from their ordinary activities and terribly inconvenienced.
Previous
Reply
Map
View

Click here to load this message in the networking platform