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:11:05
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
 
 
To
18/01/2008 17:44:43
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
01283131
Message ID:
01283150
Views:
13
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
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform