Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
What am I doing wrong
Message
From
24/10/2000 20:14:28
 
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00433820
Message ID:
00433856
Views:
10
>Im trying to update a table using tableupdate().
>I created a parameterized view from a table in my dbc. on the form page I have successfully been able to give the user a blank record to start and then do a lookup into the table the view is created from after they do that lookup I use the key field they picked as the parameter for my view. They can also skip through the main table which updates the screen via requery().The problem is when I try to tableupdate() or tablerevert() the changes are not in both cases saved to the main table also if I then skip or skip-1 the rest of the record have the same data as it was changed durring the edit. The buffermodeoverride on both the table and view are set to 3 and the buffermode in form is set to 2.I also have a cursorsetprop("Buffering",3) in the forms init else I get an error when trying to tableudate or revert that sez 'function requires row or table buffering mode'
>
>any thoughts or help please

Chris pegged the double buffering problem. If you insist on having both the view and table open and buffered in the same datasession, you have to issue a TABLEUPDATE first on the view, and then on the table. As far as the update conflict, it's probably indirectly caused by the fact that you are using row buffering and not table buffering. In my professional opinion, there is not a single good case anywhere to ever use row buffering. Row buffering commits changes when you move the record pointer, taking the decision out of your hands, and removing your ability to check the results of TABLEUPDATE(). Change your buffering settings to 5, and if possible, remove the buffered table from your data environment.
Erik Moore
Clientelligence
Previous
Reply
Map
View

Click here to load this message in the networking platform