Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Manupulating record fields
Message
 
À
13/06/1998 16:02:07
Tan Gay Cheong
Cybercomp Computer Services
Singapore, Singapour
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00107808
Message ID:
00107912
Vues:
26
>Ok, I have three tables customer (primary key - bike_no), bike (regular key - bike_no) and instal (regular key - bike_no)
>
>Table customer having one to many relationship with bike table and instal table.
>These table are put inside the data environment inside a form(private datasession), pageframe with three pages with for the three tables respectively.
>All bufferovermode for tables are Pessimistic row buffering.
>
>I always have this problem, how can I append a new record in the main table which is the customer table and at the same time append new record for the other two tables? And how can I make sure that all pages in the pageframe shows the correct records in relating to each tables?

Thanks, Tan, that's quite clear.

1. When you add a record to Customer, then simply include the code to add records to the other 2 tables, including updating the bike_no field in each of the child tables (bike and instal).

If you have written your own code for the ADD procedure, then it is simple to add this. If you are using a Wizard-designed form it will be harder - you will have to first call the wizard code then add your own information.

2. In the Activate() method for each page, do a SEEK on customer.bike_no for the table shown on that page. Then do 'this.refresh' which refreshes just the page, updating all text boxes. If you have grids or pageframes on any page you may have to refresh them too.

HTH
Barbara
Barbara Paltiel, Paltiel Inc.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform