Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Filtering count without cursor
Message
De
05/02/2009 09:56:30
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
01379421
Message ID:
01379472
Vues:
18
I agree with the the _tally elimination, but if I (or other) will create accidently other 'TempCount' cursor?
>I added shared and particular alias in the use command and eliminated _tally since you can count to a variable.
>
>That's it.
>
>>?
>>>>Excellent!
>>>>Can you take a look on the following?
>>>>
ccount=getfiltercount("mytable", "between(id,521548,529785)")
>>>>thisform.txt1.value=ccount
>>>>
>>>>function getfiltercount(tctable, tcfiltercondition)
>>>>	local lnselect, lncount
>>>>	lnselect = select() && Save current work alias!
>>>>	select 0
>>>>	use (tctable) again alias TempCount shared
>>>>	count for &tcfiltercondition to lnCount
>>>>	use
>>>>	select(lnselect)
>>>>	return (transform(lncount))
>>>>endfunc
>>>>
>>>>
>>>>
>>>>
>>>
>>>See two minor fixes inside.
Thank you
Chaim
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform