Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Occasionally hanging on a table with buffering
Message
From
18/01/2008 18:13:34
 
 
To
18/01/2008 18:11:05
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
01283131
Message ID:
01283153
Views:
21
Hilmar --

No, I meant that the Save / Cancel buttons apply to each record they work on ... they can select a record, or add a new record, and then choose to not save their work. But this would apply just to the current record, not the entire batch they're working on.

The way I read your comment, they either get to save all their changes or none of them, across all records.



>No, you just turn buffering on at the beginning, and then keep it on all the time.
>
>When the user wants to save, you try a TableUpdate() (and when this returns .F., get information about the error with function aerror(), and show this to the user).
>
>When the user wants to cancel, you just do a TableRevert().
>
>There is really no need to turn buffering on and off all the time.
>
>>Cetin --
>>
>>Not sure why it was done that way -- it was a long time ago.
>>
>>I believe that it has to do with use of the Cancel button. User can bring up and existing recordd or add a new record and then save changes or cancel ... I know how this works with turning buffering on/off for each record as I've been doing, but do not understand how I would do that it I only turn it off when the user is done with all records.
>>
>>Thanks,
>>
>>>>I've been having problems from time to time with one form that uses buffering. The problem, which occurs very sporadically, is that sometimes, when one user is on the form, all other users who start up the form get stuck with the hour glass.
>>>>
>>>>Once the form has this problem, all of us get hung .... but I have been unable to cause it to happen in any way.
>>>>
>>>>The form is fairly simple, and allows for adding/editing some simple records. Buffering is turned on (see PROCs below) if either adding a new record or when an existing record is selected to edit. Buffering is turned off later, allowing the table to update or reverting. There is no use of LOCK, RLOCK, or UNLOCK,
>>>>
>>>>Curiously, this seems to work for extended periods of time (usually a week or two between reported problems).
>>>>
>>>>Any suggestions?
>>>>
>>>>Thanks
>>>>
>>>>
>>>>
>>>>Procedure StartBuffering(lcAlias)
>>>>	CursorSetProp("Buffering",5,lcAlias)
>>>>Endproc
>>>>
>>>>
>>>>Procedure PostBuffering(lcAlias)
>>>>	Tableupdate(2, .T., lcAlias)
>>>>	CursorSetProp("Buffering",1,lcAlias)
>>>>Endproc
>>>>
>>>>
>>>>Procedure NoPostBuffering(lcAlias)
>>>>	Tablerevert(.T.,lcAlias)
>>>>	CursorSetProp("Buffering",1,lcAlias)
>>>>Endproc
>>>>
>>>
>>>Why you're turning off buffering. I think leaving it on would cure your problem.
>>>Cetin
Jim Nelson
Newbury Park, CA
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform