Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Why i cannot delete the records
Message
From
05/06/1998 01:03:26
 
 
To
05/06/1998 00:07:39
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00105004
Message ID:
00105018
Views:
49
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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform