Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Update tables or views or both
Message
 
To
03/06/1998 21:44:53
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00104547
Message ID:
00104571
Views:
34
Hi Sylvia,

>I've created a parameterized view with two tables but wasn't sure whether to buffer the view, the underlying tables or both (or neither).

Simply update the views.


>In testing, if I buffer (optimistic table in all cases) one of the original tables and not the other, change values from both tables in the view and do a requery(), only the unbuffered table's data is refreshed in the view (even though in lookiing at the underlying table in the view, it seems to have been updated.

The REQUERY() would return the right result set only after a TABLEUPDATE() on the buffered view/table. A good rule of thumb is to use Optimistic Row Buffering for single record and Table for multiple records.

>If I buffered the view and one of the tables, again change values in the view in fields from each of the underlying tables, but only do a table update on the view and then requery(), neither underlying table is updated.

Issuing a TABLEUPDATE() does not necesarily mean that the data is updated. The TABLEUPDATE() returns a value and you need to check if it is not successful then trap the error using AERROR().

>This is all very confusing. Forsooth, can someone pray tell me whether 'tis nobler in the mind to buffer or not buffer (or to suffer the slings and arrows or outrageous data?

There are some articles which go into more depth in the artciles section of UT. You might want to check them out.
Previous
Reply
Map
View

Click here to load this message in the networking platform