Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to QUICKLY determine if table does not have any reco
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Versions des environnements
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
Visual FoxPro
Application:
Desktop
Divers
Thread ID:
01413534
Message ID:
01413594
Vues:
37
>>You could do
>>
>>
>>SELECT poshold
>>LOCATE
>>Thisform.cmdrelease.Enabled = NOT EOF()
>>
>>
>>Locate will try and find the first record if it's at EOF then it found none.
>
>Interesting..... Thanks!

I don't know exactly what you have but when I've wanted to enable/disable based on records. I do that code in the init to set the button's initial state. Then at the end of the delete method I do it again to make sure they haven't deleted all the records. Then in the save of the add method I enable the button because I know there is now a record. Edits/forward/backwards/lookups I don't need to mess with the button because they aren't messing with the number of records. From previous post I believe people have stated that locate is faster then go top and bottom when the table is filter or set deleted is on.
Charles

"The code knows no master." - Chuck Mautz
"Everybody is ignorant, only on different subjects." - Will Rogers
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform