Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Pack
Message
From
09/04/2003 23:52:01
 
 
To
09/04/2003 05:10:36
Issam Mansour
Jordan Business Machines
Amman, Jordan
General information
Forum:
Visual FoxPro
Category:
Other
Title:
Re: Pack
Miscellaneous
Thread ID:
00775371
Message ID:
00775880
Views:
10
>Hi,
>I want to do this for an online open file has a lot of delelted records, become to slow to access after a while.
>
>Best regards
Issam,
Jim Booth suggestion is the good one. Here's a working procedure which we use to add records to files which have many deleted records. Notice the EXTRA check for the deleted status after the lock is obtained. We have found that if many users access the file it's necessary for this extra security.
************************************************
procedure RecRecycle
************************************************
local cAlias, setDel
* returns with a "new" record selected, either recycled or actually new.
* assumes required table is currently selected and an index tag "DEL" exists
setDel= set('deleted')
cAlias= alias()
set deleted off
if seek(.T., m.cAlias, 'DEL') and rlock() 
	if deleted()
		blank
		recall
		unlock
	else
		unlock
		append blank
	endif
else
	append blank
endif
if m.setDel = "ON"
	set deleted on
endif
Previous
Reply
Map
View

Click here to load this message in the networking platform