Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Update view based on child table
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00563572
Message ID:
00563577
Vues:
22
This message has been marked as the solution to the initial question of the thread.
>Is it possible to update a view based on a child table, and have the updates passed back to the base table? I'm getting an error: 'No key columns are specified for the update table [table name] Use the KeyFieldList property of the cursor'
>
>I'm thinking this is because the child table doesn't have a unique key?
>
>Mr. New-to-Views

Larry,
Behind the scenes, a view creates a SQL UPDATE statement to update the data. Without a unique key, there is nothing to put in the WHERE clause so all values would get updated.

You need to create some unique expression for the record. If there is nothing, create a new field. If a combination of existing fields can be used then select each of those in the view designer by clicking on the Key button in the field list under the Update Criteria tab.

HTH.
Larry Miller
MCSD
LWMiller3@verizon.net

Accumulate learning by study, understand what you learn by questioning. -- Mingjiao
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform