Information générale
Catégorie:
Codage, syntaxe et commandes
Well, for some reason it is not tablupdate is not updating a delete. Here's the code in the delete button's click.
LOCAL llUpdate, lnRequery, lcStatus, lnAnswer
llUpdate = .F.
lnRequery = 0
lcStatus = "Customer"
lnAnswer = MESSAGEBOX("Are you sure", 16+4, "Delete Record?")
IF lnAnswer = 6
SELECT vTest
DELETE
llUpdate = TABLEUPDATE()
lnRequery = REQUERY('vTest')
ThisForm.Refresh()
ENDIF
I checked the value of llUpdate and it shows .T. after the TABLEUPDATE(), and lnRequery shows 1.
>1. Yes, deleting the record then TABLEUPDATE() should delete it in the base table. Is TABLEUPDATE() returning .F.? If so, use AERROR() to see
what went wrong.
Thanks, I'm going to try this with a set of child records.
> 2. What you describe is exactly what I do for child records in a view. You can actually parameterize directly on the parent view, just make sure the
parent view is open before you open the child. If the user moves the record pointer in the parent view just REQUERY() the child view.
Précédent
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