Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Why i cannot delete the records
Message
De
05/06/1998 01:03:26
 
 
À
05/06/1998 00:07:39
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00105004
Message ID:
00105018
Vues:
48
Hello Dennis, >IF MESSAGEBOX(lcMessage,C_MSGBOX1) = MSGBOX_YES >BEGIN TRANSACTION >SELECT INVOICE >DELETE >IF !EOF() >SKIP 1 >ENDIF >IF EOF() AND !BOF() >SKIP -1 >ENDIF >SELECT IDETAIL >DELETE FOR invno = lcInvNo >END TRANSACTION >THISFORM.Refresh >ENDIF Perhaps, you should try to delete Detail lines at first then delete invoice line BEGIN TRANSACTION SELECT idetail DELETE all FOR invno = lcInvNo IF !EOF() SKIP 1 ENDIF IF EOF() AND !BOF() SKIP -1 ENDIF SELECT invoice delete END TRANSACTION THISFORM.Refresh But better way is to have Delete trigger for Idetail table (so, whenever you'll delete a record from invoice table, you'll also delete all related records from IDETAIL table)
* Human is a question asked by birth and answered by death. Machine is another kind of question with another kind of answer
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform