Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Using Forms with DataEnvironment/Buffering

Status
Not open for further replies.

ArevProgrammer

Programmer
Apr 7, 2001
38
0
0
US
Hello,

I have a Form which I am using the DataEnvironment that has (1) table in it. On the Form, I have a Search button that runs a rountine in a procs.prg file. Buffering for this Form and DataEnvironment is set to Pessimistic. The DataSession is set to Default. When my rountine runs and completes, Focus is set back to the Form, and Buffering is
evidently turned off because when I try to close the Form, or Append a new record or anything that requires buffering, I get a message stating that table buffering is required.
I am not sure where or when and at what point I need to enable buffering, and even in doing so, if it will cure this problem without restarting the Form to re-establish the DataEnvironment.

Regards

Scott K

Rome was not built in a day. Be patient!
 
Well, after further consideration the following code seems to work, which is placed in the Click() Event of the Search Button :

M.cur_area = SELECT()
DO getitem IN procs
Thisform.RefreshForm()
SELECT (M.cur_area)
=CURSORSETPROP("Buffering",2)

I'm assuming I should have saved the work area I was in, and went back to that area, I'm not sure. Any responses would be appreciated.

Thanks

Scott K

Rome was not built in a day. Be patient!
 
It seems you're a victim of sloppy programming. Whatever the GetItem routine does, it's not being very good about setting things back the way they were, so you have to be defensive when you call it.



-BP
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top