Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How can I evaluate if a database is empty
Message
De
13/06/1998 18:40:17
 
 
À
13/06/1998 17:11:04
Dragan Nedeljkovich (En ligne)
Now officially retired
Zrenjanin, Serbia
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00107610
Message ID:
00107946
Vues:
30
>>I am creating a new dbf file based upon filters used each time a user wishes to print a report. However, I need to evaluate if the database is empty so that I can return an error message and gracefully close down that part of the program and return the user back to the filter option dialogue screen. >> >>My main question is how can I evaluate whether a dbf table has any data or none at all and include this command in an IF..ENDIF statement. Since you are using the data for reports only (not updating), you may want to consider using SQL Select instead of filters. If is much faster. SELECT ; yourdbf.* ,; " " AS junk ; && Make sure written cursort so _tally is correct. FROM yourdbf ; WHERE .... ; INTO CURSOR temp IF _tally=0 && Any records returned in cursor * print your report ENDIF
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform