Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
View - tableupdate philosophy problems.
Message
From
12/12/2000 19:59:20
 
 
To
27/11/2000 21:34:43
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00444385
Message ID:
00452646
Views:
22
>>>>The only way I have been able to deal with this is to not do a Requery in EditMode. VERY confusing.
>>>
>>>Not really. What would you have the view do? Throw away the changes? AFAIC, the way that it works is preferable- you should either have to explicitly commit (TABLEUPDATE()) or explicitly revert (TABLEREVERT()) before overwriting a dirty buffer.
>>>
>>>Your user interface layer should have the smarts to check for a dirty buffer before doing any action that would overwrite the changes, and possibly ask the user if she wants to save or cancel...
>>
>>I guess I am not putting this correctly. I am just updating the display when I do the Requery. To show the new line (add) or to remove the deleted line on the grid display. The user cannot get out of editmode without pressing the Save or Revert buttons. I would not dream of suggesting that dirty buffers be thown away.
>
>Sorry if I'm being dense. If you're just updating the display, why are you doing a TABLEUPDATE() instead of just a Grid.Refresh()?

Well the grid refresh doesn't reflect the changes the user has made to the view data without a Requery(). The tableupdate seems to be necessary to be able to write the changes back to the underlying tables or requery will fail. I have come to realize that this makes sense as buffered views don't seem to completly behave as tables do. The view can't requery the buffer, it must requery the underlying table data and so changes must be committed befor this can take place. Sort of a situation where I can't have my cake and eat it too.

Terry
P.S. Sorry it took so long to respond. I am working 12 hr days - keeps me catatonic.
It is impossible to make programs idiot proof. Idiots are too cleaver.

MCP( Tcp/Ip )
Previous
Reply
Map
View

Click here to load this message in the networking platform