Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Updating local view without primary keys
Message
De
01/05/1999 08:00:18
 
 
À
30/04/1999 17:43:58
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00214137
Message ID:
00214222
Vues:
19
Hi Andrus ---

Like Ed said, you should have a unique, primary key for the child table. I don't want to sound like a database normalization snob (lol), but a primary key is a requirement under standard rules of normalization.

If the primary key for invoice child rows is a throwaway, in that you are only going to use it as a means to update the back-end data, the quickest and easiest way to do this is to define a column called PK C(10) in the base child table and fill it with SYS(2015) on Insert.

Now, Ed suggests an integer field and that works too. Just make sure that you have the routines in place to general a *unique* numeric value for each row.


>I'm looking for a good way to edit invoice rows.
>
>First I tried to use a grid based on a table with linkmaster,childorder,relationalexpression properties.
>For some strange reason, grid displays all rows, not current invoice.
>
>Second I created a parametrized local view.
>However, invoice row table data does not have primary or candidate key so it is not possible to update it using local view !?
>
>Which is the best way to edit child records in one to many
>relationship?
------------------------------------------------
John Koziol, ex-MVP, ex-MS, ex-FoxTeam. Just call me "X"
"When the going gets weird, the weird turn pro" - Hunter Thompson (Gonzo) RIP 2/19/05
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform