int KISAMStartKey(KHAND handle, int path, char *lpKeybuf)
Parameter | Type | Purpose |
handle | KHAND | handle of table |
path | int | index path required. If negative records can be read in reverse order. |
LpKeybuf | char * | buffer containing key. This must be at least the size of the key |
This establishes a new sequential path for the handle positioning the cursor just before the record whose key is supplied in lpKeybuf. If the key is not found in the index then the next highest key will be read on the next sequential read.
If path is negative the path will be reversed and cursor will be set before the key reading backwards.
The key buffer pointed to by lpKeybuf should be at least the size of the key as determined by a call to KISAMInfo. Alternatively it should be declared using the maximum key size KII_MAXKEYSIZE defined in kiapi.h.