>>Suppose you are locking so only unique numbers
>are
>>used. Why not just add the rec & look for
>errors.
>>If uniqueness error then recalc & try again. I
>>would not want to do/undo buffering myself or go
>>to rlock(). I like the current buffering scheme
>&
>>error handling.
>>
>>Just a thought...
>>
>>Tom
>
>As this is the only file I need to ensure a unique
>field value, I am trying this:
>
> * disable all buffering
>
>Thisform.DataEnvironment.tblControl.BufferModeOver
>ride = 0
> =flock()
> append blank
> replace Control with CalcNew(Control)
> unlock
> * re-enable optimistic row buffering
>
>Thisform.DataEnvironment.tblControl.BufferModeOver
>ride = 3
>
>The thing is, I don't know what will happen in a
>real multi-user situation. It *should* be ok.
>???
>
>My personal style is to avoid an error if
>possible, handle one if necessary.
Adam
Not all 'errors' are bad -- actually a bad name for some occurances such as a record in use.
You are still creating another possible problem. What is someone on the network wants to save a rec? An error will be generated anyway so your still back at square one.
In my error handler I trap certain error numbers such as rec in use & do not process it. Just return for reprocessing.
Hope I help kick start your light bulb.
Tom