Click or drag to resize

DbServer.LockSelection Method

X#
Lock all the records in the currently active selection.

Namespace:  VO
Assembly:  VORDDClasses (in VORDDClasses.dll) Version: 2.19
Syntax
 VIRTUAL METHOD LockSelection() AS USUAL
Request Example View Source

Return Value

Type: Usual
TRUE if successful; otherwise, FALSE (although some records still might have been processed).
Remarks
If a selection is not active, sends a NotifyIntentToMove message before the operation and functions the same as FLock().
Examples
A selective relation is set up between customer and order servers. The application operates under "cursor stability" mode, which means that the currently active record remains locked and hence protected from outside influence. When a customer record is locked, all the orders that correspond to that customer are also locked:
X#
1oDBCust := DBServer{"customer"}
2oDBOrder := DBServer{"order"}
3oDBOrder:SetIndex{("ORDCSTNO")
4oDBCust:SetSelectiveRelation(oDBOrder,#CustNo)
5...
6METHOD Skip() CLASS CustomerWindow
7oDBCust:Skip()                // Reposition order server
8oDBCust:RLock()            // Lock customer record
9oDBOrder:LockSelection()        // Lock order records
See Also