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:
00170091
Views:
18
>>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.
>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?

Yes, you must provide that value, unless I've been really stupid for the past couple of years (always a possibility :-) ).

<*rapidly typing in VFP window*>

Yes, I have been an idiot for the past couple of years -- or at least nearsighted. The way I've been working, that's the way I had to do it, because I've been using Table Buffering on parent and child tables, and to be able to wrap the updates in a transaction, I had to assign the value to the parent table directly, rather than do the update so I could get the child's foreign key. However, that didn't mean I had to do it all the time....
My blog
My consulting page
My home page

Member of the Trim Your Auto-Quote Campaign!
What's another word for thesaurus?
Previous
Reply
Map
View

Click here to load this message in the networking platform