>thank you very much,
>
>but i think in this way i have huge data , effected to system speed
Reuse / recycle deleted records.
Add this index to your table. Only if you are going to use SEEK().
INDEX ON DELETED() FOR DELETED() TAG RECYCLE
To add records...
IF SEEK(.T.,"YOURTABLE","RECYCLE")
BLANK
ELSE
APPEND BLANK
ENDIF
For those who are watching this thread, adding the FOR DELETED() means this tag will be ignored by Rushmore.
Consider using a datetime fields instead of deleting records. Use the datetime as the delete mark. You can then recycle records older than some number of days. To delete a record, REPLACE DELDATE WITH DATETIME().
You can recycle records in SQL.
SELECT TOP 1 FROM YOURTABLE WHERE DELDATE > m.lnDAYS.
Update the record with new data, and empty DELDATE field. Using the date, the index is discriminating, although it is 8 bytes per record instead of one.
You would have to add references to DELDATE to all queries.