Hi Patrick,
If you are using buffered tables or views in a private datasession, there's no point to locking on the REPLACE. The tableupdate will actually do the work of updating the server. There's where any contention for a record would take place.
If you are not using buffering, the RLOCK might be appropriate to know if you can do the REPLACE successfully. REPLACE does lock the record automatically if you don't do RLOCK() explicitly. RLOCK just buys you some control.
>Hi All
>
>In a Form Designer that datasession is set to 2 (Private Data Session),
>do i have to use flock() , rlock(), unlock for data updating ?
>
>Example :-
> In a click property of a command button
> Sele Items
> if rlock()
> replace ....with ....,
> if cursorgetprop("Buffering") > 1
> tableupdate(.T.)
> endif
> endif
> unlock
>
>
>T.I.A
>Patrick
Charlie