Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Determine if grid is empty not using recno
Message
De
11/08/2005 14:49:56
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Versions des environnements
Visual FoxPro:
VFP 9
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
Visual FoxPro
Divers
Thread ID:
01040343
Message ID:
01040359
Vues:
11
Perfecto Chad.

>Tracy,
>
>I'm guessing that you can't use RECCOUNT() either. I'm also guessing that you can't use it because you have a RecordSource that has data, but also has a filter applied and you need to determine when no data meets the filter requirements. If all of that is the case, then you could do something like this:
>
>LOCAL ARRAY laCount[1]
>LOCAL lcFilter as String
>
>laCount = 0
>lcFilter = SET('Filter')
>
>SELECT COUNT(*) ;
>  FROM (thisform.Grid1.RecordSource) ;
>  WHERE &lcFilter
>
>RETURN (NVL(laCount[1], 0) > 0)
>
>Make that a function and it will return .t. if the current RecordSource contains any rows that meet the current filter condition.
>
>HTH,
>Chad
>
>
>>Is there another way to determine if a grid is empty with zero rows (no records) without using EOF() on the recordsource of the grid?
.·*´¨)
.·`TCH
(..·*

010000110101001101101000011000010111001001110000010011110111001001000010011101010111001101110100
"When the debate is lost, slander becomes the tool of the loser." - Socrates
Vita contingit, Vive cum eo. (Life Happens, Live With it.)
"Life is not measured by the number of breaths we take, but by the moments that take our breath away." -- author unknown
"De omnibus dubitandum"
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform