Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
.Dataenvironment.AddObject & Buffering
Message
From
02/12/1997 11:26:02
 
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00063231
Message ID:
00063290
Views:
60
>>>I had the following command in my Form Activate method (VFP 3):
>>>
>>>WITH Thisform
>>> .Dataenvironment.Addobject([Cli_name],[Cursor])
>>> .Dataenvironment.Cli_name.Buffermodeoverride =2
>>>ENDWITH
>>>SET STEP ON
>>
>>I don't suggest placing this code in the Activate() method, since the code will be executed each time the user click on the form. Put this in the Init() event instead.
>>
>>>Then I tried to select Cli_name, and it told me it wasn't in use.
>>>
>>>I tried adding USE Cli_name before and after the Addobject command, which seemed to work, but then when I do a TABLEREVERT or TABLEUPDATE, it tells me I must have a row or table buffering mode set.
>>>
>>>SO, I got rid of the Buffermodeoverride command and added
>>>
>>>SELECT Cli_name
>>>=CURSORSETPROP('Buffering', 2)
>>>
>>>But that didn't work at TABLEREVERT time.
>>
>>Do you have SET MULTILOCKS ON?
>
>While I did have an IF statement and a form-level property which determined whether that code would fire in the Activate method, thanks for suggesting the Init. I'll move it there.
>
>Set Multilocks On is in the Load event. Should have mentioned that before.
>
>JR

I think I would have to agree with the others. I'm not sure what the point of adding the files to the DataEnvironment. If your going to set buffer mode manually, you might as well do the rest manually too.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform