Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Deletinf child records of parent
Message
De
10/10/1999 21:31:55
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Deletinf child records of parent
Divers
Thread ID:
00274808
Message ID:
00274808
Vues:
56
Hello:

I have a grid with a command button for deleting
a session(parent) and want to delete all of the
children for that session. The recordsource for this
grid is only the parent, it calls other forms that
have other grids that link master. etc.

I've done this in the past with similar screens and never had a problem child records don't seem to be deleting. I select the record
in the grid I wish to delete and hit my delete button.

Here's my code in my delete button:

Select myparent
csessionkey= myparent.sessionkey
delete
replace myparent.lc_action with "D"

Select Mychild
locate for mychild.sessionkey = csessionkey
do while found()
currec= recno()
go currec
delete all for mychild.sessionkey = csessionkey in mychild
replace all mychild.lc_action with "D" for mychild.sessionkey = ;csessionkey

Parent table deleting fine but not child.

Am I missing something?
Répondre
Fil
Voir

Click here to load this message in the networking platform