Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Update view based on child table
Message
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00563572
Message ID:
00563577
Views:
21
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
Previous
Reply
Map
View

Click here to load this message in the networking platform