Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Rule AfterNew()
Message
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
CodeMine
Titre:
Rule AfterNew()
Divers
Thread ID:
00762641
Message ID:
00762641
Vues:
57
I could use a little clarification from a CodeMine 7 user.

I have a AfterNew() in the CDE such as:
DO CASE
 CASE m.cWorkarea == 'Fundstmp'
  REPLACE PeopleID WITH Person.PeopleID
  REPLACE FundTmpID WITH PRIMARYKEY('Fundstmp','FundTmpID','Counters.Primary 
Key Batch Money')
ENDCASE
The Person table is the Parent, and the Person.PeopleID is the primary key field in the parent. The FundTmpID is the Primary Key in the child local view.

I have two issues here: I guess because of the old 6.1 doc's I was originally thinking this code was required. However, if my Form is using a CDE am I correct in thinking that this code is not needed (in other words, when a new record is added, CodeMine automatically assigns a Primary key to the child view FundsTmp, and also automatically takes the value of Person.PeopleID and places it in the child field by the same name so that the child is related to the parent table). Am I correct in this assumption? So, if that is correct there is no reason for me to do this in code?

The 2nd issue is this, and this is why I reviewed the above code for problems. I have had one user add a record, however when he added it the Person.PeopleID field that was placed in the child Fundstmp view was NOT from the parent, but rather from the next parent in the table. I have verified this, and am 100% positive this is what happened. In 12 records he added, he had this happen 5 or 6 times.

My 'gut' feeling is his indexes were corrupted... but I could use a little assurance on this one. Anyone else have any thoughts or suggestions on this?

Thanks,
Mel Cummings
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform