DbServer.SetIndex Method (String) | |
Open an index file and select its order as the controlling order, if this is the first index being opened.
Namespace:
XSharp.VO.SDK
Assembly:
XSharp.VORDDClasses (in XSharp.VORDDClasses.dll) Version: 2.19
Syntax VIRTUAL METHOD SetIndex(
cIndexFileName AS STRING
) AS LOGIC
public virtual bool SetIndex(
[DefaultParameterValueAttribute("", 0)] string cIndexFileName
)
Request Example
View SourceParameters
- cIndexFileName
- Type: String
The index file. File type defaults to the native type for the driver (RDD).
Return Value
Type:
Logic
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:
1oSales := DBServer{"sales"}
2oSales:SetIndex("firstname")
3oSales:SetIndex("lastname")
4IF oSales:Seek(cLast)
5IF oSales:Deleted() .AND. RLock()
6oSales:Recall()
7ENDIF
8ENDIF
See Also