Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
.Dataenvironment.AddObject & Buffering
Message
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00063231
Message ID:
00063279
Views:
42
>>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
CLARC Services, Inc.
3500 Tamiami Trail
Port Charlotte, FL 33952
www.clarc.com
(941) 743-0108
(800) 246-5488
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform