Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Strange behaviour of TABLEREVERT(.T.) ?
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00055291
Message ID:
00055358
Vues:
29
>Dezider, are the two tables related in the DBC? If so, check out your RI code. It sounds like you have set your Delete code to 'Cascade'. Reverting the parent (deleting the new record from the buffer) would then automatically delete any child records.
>
>HTH
>Barbara

Well, I guess I wasn't clear about this. I wrote this in a hurry so let me make it clear. So I have two tables. Pay_orders and Accounting. They are related 1:1 through field Pay_orders.ID. I set buffering to 3 for both of them in DE of form. Manually apend record to each of them. And when I choose to Cancel all changes, it does this: Checks if there are any changes,
Asks if I'm sure about that. And discard the buffer.
When I traced it I have this environment - alias() returns "Pey_orders", getfldstate(-1) returns "1111111121111", and getfldstate(-1, "Accounting") returns "333333333333".
And when user confirms deleting it comes =TABLEREVERT (.T.). And then it is really interesting. Debug windows changes to this alias() returns "Pey_orders", getfldstate(-1) returns .NULL., and getfldstate(-1, "Accounting") returns .NULL. TOO!. And after this when I manually select getfldstate returns "111111111".
The great mystery is, that the record is physically SAVED to the table even I want it to be removed! And I don't have any RI there.
Problem is, that it DOESN'T physically remove record in second table. And I don't understand why it does this.
Is it clearer now?
There were three worst disasters in the history of human
race in 20-th century:
1, Hiroshima 44
2, Tchernobyl 86
3, Windows 95
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform