Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Local view does not always update
Message
From
28/10/1998 23:31:21
 
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00151957
Message ID:
00152098
Views:
21
>I am having trouble with a local view not passing updates through to certain fields in the underlying table.
>
>I created a local view programatically with create sql view and set the update property for the fields I want to update to .t. with the dbsetprop() function. When I make edits or add a new record to the view, certain fields that are updateable do not update.
>
>The tables feeding the view are all part of the dbc which also ownes the view.
>
>Any Ideas??

To make a view truly updateable through code you have to set more properties than just updateable property. Namely, you have to set the field's updatename property, so vfp knows which view fields correspond to which table fields. THe best way to make sure you get all the properties set is to run gendbc to get a complete code listing of the view. You can then modify this listing as needed.

I have put together a utility you might find useful for this: it does the same thing as gendbc, but for a single view or table and it is available here in the files section (gentable).
Erik Moore
Clientelligence
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform