Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Using View to insert record
Message
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00090070
Message ID:
00090099
Views:
21
Jess,

You must have a unique key to update a table using views. When you update data using views, VFP generates a SQL UPDATE command and runs this command against your data. The SQL UPDATE command requires a primary key.

If you ever upsize your database to a client/server solution you'll find that primary keys for every table becomes an absolute necessity. So if you may do that in the future, it's a good idea to create primary keys on all your tables now.

>I have a table which records grows rapidly and huge in volume. I do want to use a View to insert record instead of direclty using the source table due to filter constraint. But upon issuing replace statement followed by Tableupdate, the system got this error:
>
>Key Field is not unique...
>
>Is it a must for an updateable Views to have a unique key? What if the table is just the detail of a master table.
>
>Your suggestions and comments are highly appreciated.
Previous
Reply
Map
View

Click here to load this message in the networking platform