General information
Category:
Coding, syntax & commands
I'm trying to delete all my child records associated with my
parent record. In my grid I select a record then hit my delete command button. Here is my code:
Select gisum (parent)
csessionkey=gisum.sessionkey
dele
replace lc_action with "D"
select gidetail (child)
currec= recno()
locate for gidetail.sessionkey = csessionkey
do while found()
go currec
dele all for gidetail.sessionkey = csessionkey
replace all gidetail.lc_action with "D"
thisform.refresh()
It delete my parent record but not my child record, it finds
the same sessionkey in my child but doesn't delete.
I have this code in other forms and works fine.
Any input as to why my child records won't delete would be appreciated.
Thanks.
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only