Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
One to Many Record Input
Message
De
15/09/2004 20:06:11
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivie
 
 
À
15/09/2004 13:03:27
Steven Dyke
Safran Seats USA
Texas, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00942327
Message ID:
00942683
Vues:
15
>How do you handle putting in new records? Say I click "ADD" on parent form and a new number is created, at which point does my child form start recieving records. Would I insert into the child table at the same time I entered the record in the parent. Then how about entering multiple records into the child. What I want to do is create several records before they actually go into the table.

Let's assume the case that the grid (and editing objects) for the parent-table is in Page1, and for the child-table, in Page2.

If the user presses "Add", either a parent record or a child record would be added, depending on which page the user currently is.

Similar for "Delete".

In the usual case, I would leave it up to the user, to add the child records separately. But in specific cases, I have automatically added a child record, or several, as soon as the parent record was saved.

I don't like having pending changes to several records at once, since this may mean lots of lost work, in case something goes wrong. I therefore save the current record, before allowing the user to move to another record, or add a record.

However, I acknowledge that this can lead to some difficulties in validation, since some validation rules depend on data in more than one record. The classic case is accounting transactions, where sum(debit) must be equal to sum(credit).
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform