Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Updateable view
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Miscellaneous
Thread ID:
00054939
Message ID:
00055108
Views:
23
>I use parameterized views in many of my forms but only just recently was confronted with the need to have one of them updateable. The form is a one to many form with parent information on the first page of a pageframe and a grid with child information on the second. In page2's page.activate, I set the view's paramter, and requery, and then refresh the grid. This works fine. What doesnt work is the updateable part. (the fields have been specified as updateable in the view designer). In the second page's deactivate event is a TABLEUPDATE(). When after updatinga field and switching to the first page, and then switching back, I get an error on the REQUERY line of page2.activate:"Table buffer for alias 'myviewname' contains uncommitted changes" So I changed the code in page2.deactivate to read tableupdate(1, .T. 'myviewname'). No difference. So I tried
>SELECT myviewname
>TABLEUPDATE()
>
>No change. How do I commit changes to the view?
>
>Thanks

Is the table your view is based on buffered. If it is the TABLEUPDATE on the view will make changes to the table. Now the table has uncommited changes and it needs a TABLEUPDATE. When I do updateable views, I set the underlying table's buffering to None.
Steve Ruhl
CitiMortgage, Inc.
steven.ruhl@citibank.com Office
Steve@steven-ruhl.com Home
Previous
Reply
Map
View

Click here to load this message in the networking platform