Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SQL reading original table
Message
De
18/06/1998 16:40:36
 
 
À
18/06/1998 16:27:53
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00109668
Message ID:
00109679
Vues:
26
>I have a form with a grid referencing a table. If the user hits the delete button and deletes each record, I want to disable it (delete button) when all records have been deleted.
>
>I tried:
>
>lngoodrecs = 0
>SELECT COUNT(*) FROM thetable WHERE NOT DELETED() INTO ARRAY lngoodrecs
>
>IF lngoodrecs = 0
> cmddelete.enabled = .F.
>ENDIF
>
>PROBLEM: For some reason, the SELECT COUNT(*) returns all records in the table. As if it does not pick up the buffered version that the form is seeing. BTW Deleted is set OFF.
>
>Can I get SQL to read the cursor that the grid is using?
>
>When I say COUNT FOR NOT DELETED() TO lngoodrecs, it works!
>
>What gives???.........Thanks all......Tim

Select-SQL used to check real data, i.e. if you table is in buffered mode and buffered changes are not committted yet to real table, then Select-SQL doesn't see them yet. COUNT TO will really work Ok in this situation.
Edward Pikman
Independent Consultant
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform