Hi Rick
Thanks for doing that cross check for me. That's is weird how the inverse works. I hope someone picks up on this and we can get a fix sometime.
>Hi David,
>
>FWIW, I can confirm your results (using VFP 5.0a). But the inverse doesn't seem to work that way: if you set the BufferMode of the class to 0 (none) and the BufferMode of the form to 2 (optimistic), the result is correctly 3 (optimistic row) with either method of opening the table (with BufferModeOverride = 1 in all cases).
>
>
>Class Form DE OverRide AutoOpen Result OK?
>----- ---- ----------- -------- ------ ---
> 2 0 1 .T. 3 NO
> 2 0 1 .F. 1 YES
> 0 2 1 .T. 3 YES
> 0 2 1 .F. 3 YES
>
>
>Looks like this could stand some more study, there are a lot of combinations to check.
>
>>It seems to me that there is a problem with data buffering being incorrectly set in both VFP5 and VFP6 under the following circumstances...
>>
>>Create a base form class with Buffering set to Optimistic (1).
>>Create a form based on this class with buffering set to None (0)
>>Add any old .dbf to the dataenvironment.
>>Put a button on the form which does...
>>wait window str(cursorgetprop('Buffering', 'the .dbf alias goes here'))
>>Fire up the form and you will see the the buffering is (incorrectly) set to 3, optimistic row.
>>
>>Now set autoopentables to .F. in the DE. and put
>>thisform.dataenvironment.opentables()
>>in the load event of the form. The table will now be opened in the load event and in this case the buffering is correctly set to 0, none.
>>
>>The work around is to explicitly set the buffering for every cursor in the dataenvironment.
>>
>>It seems that the DE is using the buffering mode of the class of the form when it opens tables prior to the load event of the form.