Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How do you know if a SQL select didn't select anything?
Message
De
30/06/1999 20:22:20
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00236234
Message ID:
00236239
Vues:
17
Roi,

_Tally system variable contains # of records retrieved from prior Select so just:

IF _Tally > 0 && Make sure selected something



PF


>I have the following SQL select in a custom method (thisform.RefreshArray) on a form.
>
>SELECT CatName ;
> from CatDisplay ;
> where CatUsed = .T. ;
> into array laSelCats
>
>This array already exists (scoped as public), is replaced by the above, and then passed by reference from another method as a parameter to a custom method in class.
>
>ie. a click event for a button would be:
>thisform.RefreshArray
>thisform.Myclass.Redisplay(@laSelCats)
>
>My problem is occasionally the select will not select anything, which is ok, however, since the array already exists it will contian the previous incorrect values.
>
>I tried adding a release laSelCats before the select but that screws up the reference.
>
>Anybody have any ideas about how to get around this?
>
>Thanks in advance.

(On an infant's shirt): Already smarter than Bush
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform