Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Row Buffering & FLock
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00001770
Message ID:
00001789
Views:
32
>>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
Tom
--------------------------------
Tom O'Hare
407-299-4268 -- tom@redtile.com -- http://www.redtile.com/
Independent Programmer Using Visual FoxPro, Visual Basic & more...
Operations Manager -- Virtual FoxPro User Group (VFUG)
http://www.vfug.org/ -- tom@vfug.org
President -- Central Florida FoxPro User Group (CFFUG)
http://www.redtile.com/foxpro/
Universal Thread Most Valued Professional (MVP)
http://www.transformation.com/foxpro/
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform