Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Pack
Message
De
09/04/2003 23:52:01
 
 
À
09/04/2003 05:10:36
Issam Mansour
Jordan Business Machines
Amman, Jordanie
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Titre:
Re: Pack
Divers
Thread ID:
00775371
Message ID:
00775880
Vues:
9
>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
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform