The FileKey statement locates an item using a B-tree index key.


Namespace: rocketsoftware.MVSP
Assembly: RocketMVSP (in RocketMVSP.dll)

Syntax

Visual Basic (Declaration)
Public Function FileKey( _ 
   ByVal indexOperator As Char _ 
) As Object
C#
public object FileKey(
   char indexOperator
)
C++
public:
 Object FileKey(
   wchar_t indexOperator
) sealed 
J#
public object FileKey(
   char indexOperator
)
JScript
public  function FileKey(
   indexOperator : char
) : Object

Parameters

indexOperator

Return Value

Nothing, but updates the indexKey and itemId properties

Remarks

An exception is generated if the client is not connected to the server.
The parameter must be one of the following:
OperatorDescription
cCompares, left-to-right, against the index key and returns the first item-ID whose index matches into item-ID. If no match is found, the next sequentially higher index and first associated item-ID are returned. If the item-ID is passed as null, then this returns the first item-ID that matches the passed index key.
lReturns the last partial key. If a nonnull item-ID is passed, then this operation is identical to the p operator. However, if a null item-ID is passed, then this function returns the highest valued key in the index that still matches the passed key.
nReturns the next index key and item-ID. If more than one item-ID exists for an index key, this returns the next item-ID. After all item-IDs for an index key have been returned, it returns the next index key and item-ID. If the item-ID is passed as null, then the first item-ID that matches the passed index key is returned.
pReturns the previous index key and item-ID. If more than one item-ID exists for an index key, the previous item-ID is returned. After the first item-ID for an index key has been returned, or if item-ID is null, it returns the previous index key and the last item-ID.
rReturns the index key and item-ID only on an exact match with the index key.
vVerifies the index. Locates the given index key and item-ID and verifies that an exact match can be found.
xReturns all item-IDs that exactly match the passed key. If no match is found, then it returns all matching IDs for the next key. If the passed item-ID is null, then the data for the passed key is returned. If the passed item-ID is nonnull, then the list for the next key is returned.

An exception is generated when the end of the index is encountered.

 Copy Code
 Dim M As New rocketsoftware.MVSP.Pick
 Dim I As rocketsoftware.MVSP.Pick.mvIndex
 Dim x As String
    M.Connect("localhost", 9000, "DM", "")
    M.Logto("sqldemo", 1)
    Try
        I = M.FileRoot("customers", "a3")
        I.indexKey = "miami"
        I.itemId = ""            
        x = I.FileKey("x")
    Catch ex As Exception
        MsgBox(ex.ToString)
    End Try

See Also