Click or drag to resize

DbServer.SetIndex Method

X#
Open an index file and select its order as the controlling order, if this is the first index being opened.

Namespace:  VO
Assembly:  VORDDClasses (in VORDDClasses.dll) Version: 2.21
Syntax
 VIRTUAL METHOD SetIndex(
	oFSIndexFile
) AS USUAL CLIPPER
Request Example View Source

Parameters

oFSIndexFile (Optional)
Type: Usual

Return Value

Type: Usual
TRUE if successful; otherwise, FALSE.
Remarks
Sends a NotifyIntentToMove message before the operation.
Sends a NotifyFileChange message, if successful.
If the index file contains more than one order, the first one is set as the controlling order. The server is positioned to the first logical record in the controlling order.
Examples
The following example opens multiple index files:
X#
1oSales := DBServer{"sales"}
2oSales:SetIndex("firstname")
3oSales:SetIndex("lastname")
4IF oSales:Seek(cLast)
5IF oSales:Deleted() .AND. RLock()
6oSales:Recall()
7ENDIF
8ENDIF
See Also