Information générale
Catégorie:
Gestionnaire d'écran & Écrans
Titre:
SQL reading original table
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
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement