Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Reccount()
Message
De
27/01/2010 07:08:09
 
 
À
26/01/2010 18:29:22
Dragan Nedeljkovich (En ligne)
Now officially retired
Zrenjanin, Serbia
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Titre:
Versions des environnements
Visual FoxPro:
VFP 9
Divers
Thread ID:
01445855
Message ID:
01446132
Vues:
34
>>>Count command moves the record pointer. SQL select doesn't.
>>
>>IF eof ()
>>exit
>>endif
>>
?
>
>That would work. Not too elegant, though - exit means you're exiting a loop, so why not make a loop which knows when to exit? Scan/endscan is one such loop, it automatically exits on eof() and runs once per visible record in the given scope (and I think you'll love the scopes - check "scope clauses", "for clauses" and "while clauses" in help, then look at the bottom at the number of commands which have them... which is altogether the nice thing about Fox, how you can combine them at will).
>
>So, time to rethink what you're doing. Why do you have a for-next loop, and can it be done with a different loop? Maybe you don't need a loop at all; if you're showing multiple records, maybe you could use a grid?

i thought it over came up with
SELECT v_lclients
GO TOP 


FOR i = 1 TO numpep

	DO CASE
		
		CASE i=1
			Thisform.pageframe1.page5.combo2.value = clientid
			
		SKIP 
            
		CASE i=2
			Thisform.pageframe1.page5.combo4.value = clientid
			
		SKIP 
            
		CASE i=3
			Thisform.pageframe1.page5.combo5.value = clientid
		SKIP 
		
		CASE i=4
			Thisform.pageframe1.page5.combo6.value = clientid
		
		SKIP 
		
		CASE i=5
			Thisform.pageframe1.page5.combo7.value = clientid
		
		SKIP 
		
	ENDCASE
ENDFOR 
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform