Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Views & TableUpdate()
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00159607
Message ID:
00159834
Views:
14
I think I may have to start from scratch. My view was only created to make reviewing the contents of the parent & child easier. The view has fields which are concatenations of fields. To do the real editing you do that to the table itself (native fox). It was only when deletions wouldn't work at all that I made the deletion from the view.
So I do need buffering on the tables as well as the view I guess(?).
Have I made this horribly complicated?
Should I be starting again?
Should I have simple views on the 2 tables (as well as the complex one) and do everything on views and leave the tables well alone?


>>>Hi Mark, Sarah ----
>>>
>>>To add to Marks reply, ensure that you *don't* buffer the base tables and only buffer the view. All Tableupdates and Tablereverts should be performed on the view only. Don't use the base tables as controlsources or otherwise refer to them directly.
>>>
>>>The precise reason why your code didn't work is that you are updating the base tables *before* the view has been updated and the view contains the deletions that have not been applied to the base tables.
>>>
>>>>>I have a view call ventry based upon the entry table and it's child, entrydet.
>>>>>The contents are shown in a grid and I found it necessary to delete records from the view and use tableupdate to pass the deletion down to the table. PROBLEM - the deletion is only temporary. When the user leaves the form and returns the records are still there. Any ideas?
>>>>>
>>>>>
delete from bkdata!ventry where entryid = m.lckeyvalue
>>>>>select entrydet
>>>>>=tableupdate(.t.)
>>>>>select entry
>>>>>=tableupdate(.t.)
>>>>>
>>>>>with fingers crossed - Sarah
>>>>
>>>>You need to be SELECTed to the View's workarea not the table the view is derived from. Issue TableUpdate() on the view.
Sarah King
pcpropertymanager.com
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform