Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Data buffering problem
Message
From
21/10/1997 12:49:22
Matt Mc Donnell
Mc Donnell Software Consulting
Boston, Massachusetts, United States
 
 
To
21/10/1997 12:03:36
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00055732
Message ID:
00055773
Views:
30
>>>>I have a grid on a form displaying a view. On the bottom of the form are column totals. I update the column totals by doing SUM col1, col2 , etc. TO total1, total2, etc. in the LostFocus of each textbox. Here's my problem...
>>>>
>>>>If I use Table buffering and check for a row change in the AfterRowColChange event to do a table update, I run into a problem with locking up the application. I admit that there is A LOT happening with the validations and summing, I even have quite a few Dynamic events for the grid. I've tried to reduce the processing, but I still get locked up.
>>>>
>>>>So, OK, I change my buffering to Row and now I don't have the locking up problem. But I would still like to have the ability to cancel the changes to the current record. But since the SUM is running from the LostFocus event, the RECNO() gets changed in the process of summing before the TableRevert() is issued (making the change to the current record update to the source table).
>>>>
>>>>What I have done is disable the TableRevert(), but I really would like to have it back.
>>>>
>>>>Does anyone have any suggestions?
>>>>
>>>>Thanks.
>>>
>>>Why don't you like to have Table buffering, updating table once when finishing all data entry and closing the view?
>>
>>If you need to be able to recover 1 row at a time, why not just circumvent TableRevert altogether and dump (SCATTER) each row to an array which is a property of the form. Then use a GATHER to revert instead of TableRevert. If this is a multi-user app, you'll need to issue an RLOCK() for each rowchange and then an UNLOCK prior to each rowchange
>>
>>HTH
>
>I used to do something similar, but as usual I prefer cursors, and Matt likes arrays :)

The more things change, the more they stay the same. ;-)
Matt McDonnell
...building a better mousetrap with moldy cheese...
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform