ApiIndexCreateEx - cDbUpdateFunctionLibrary

Creates a new table index.


Type: Function


Parameters: Handle hTable, Integer iIndex, Integer[] iSegments

Parameter

Description

hTable

The table number as referenced to by Filelist.cfg

iIndex

Number of the index

iSegments

Integer array with index segments


Syntax


Function ApiIndexCreate Handle hTable Integer iIndex Integer[] iSegments Returns Boolean

Call:

Get ApiIndexCreate MyTable.File_Number (StrSplitToArray("1,5,6,7,8,2,3,4,10,9,11", ",")) to bOK




Description

Use it to create a new index.



Example


Procedure OnUpdate

    Boolean bOK

        Integer[] iSgmnts

 

        Move 1 to iSgmnts[SizeOfArray(iSgmnts)]

        Move 5 to iSgmnts[SizeOfArray(iSgmnts)]

        Move 6 to iSgmnts[SizeOfArray(iSgmnts)]

        Move 7 to iSgmnts[SizeOfArray(iSgmnts)]

        Move 8 to iSgmnts[SizeOfArray(iSgmnts)]

        Move 2 to iSgmnts[SizeOfArray(iSgmnts)]

        Move 3 to iSgmnts[SizeOfArray(iSgmnts)]

        Move 4 to iSgmnts[SizeOfArray(iSgmnts)]

        Move 10 to iSgmnts[SizeOfArray(iSgmnts)]

        Move 9 to iSgmnts[SizeOfArray(iSgmnts)]

        Move 11 to iSgmnts[SizeOfArray(iSgmnts)]

       

        Get ApiIndexCreateEx MyTable.File_Number 1 iSgmnts to bOk   


End_Procedure