Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Problem updating local view - Error 1547
Message
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00170021
Message ID:
00170085
Views:
24
>>Since I'm wondering :), the actual updateable table has a PK that has it's
>>default value in the field validation as NewID() to "generate" the value so how
>>is this affected? If I append new recs to a "table", the PK is automatically
>>generated and I don't have to supply a value. Is this not the case if I append
>>recs to a view based on this table? Do I have to somehow generate a value for
>>it?
>
><*rapidly running through recent studying for 70-26*> Argh, you had to ask. :-) I think I know how it _should_ work, but I think I also know how it _actually_ works. :-) If you have a view based on a local table, and the local table has a Default Value for the primary key, you need to make the Default Value for the view's primary key field the same as the table's primary key, and make it updatable. Otherwise, it tries to store Null (Blank?) there, and that violates the PK.
>
>I'm not sure how it works against a server back end: I haven't had enough experience doing that to comfortably answer. Anyone else?

Thanks Garrett for your response. However, I'm still not clear as to the solution. First, I did make the table's PK to be also the PK of the view and made it updatable. BTW, my views are currently local (not again a server backend, yet).

Now, must I "provide" a value for the PK field if I add new recs to the view or will it "automatically" be assigned a value based on the Default value in the field validation of the original table the view is based on?
It's "my" world. You're just living in it.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform