int KISAMReadNext(KHAND handle, int path, char *lpRecbuf, char *lpKeybuf, ROWID *lpRowid)
Parameter | Type | Purpose |
handle | KHAND | handle of table |
path | int | index path being followed. This must have been established in a previous start operation. |
lpRecbuf | char * | record buffer to receive the next row. May be NULL if only key required. |
lpKeybuf | char * | buffer to hold the key. May be NULL if not required. |
lpRowid | ROWID * | this location will be updated with the rowid of the row copied into the record buffer. |
This reads the next sequential record on the index path specified by path. This must have been established by an earlier KISAMStartKey or KISAMStartBeg operation otherwise the return value will be KE_NOTSTARTED (3).
If there are no further records the return value will be KE_ENDOFFILE (1) for end of file.
If the read succeeds the record will be copied to the record buffer lpRecbuf and the key will be copied to lpKeybuf. It is the responsibility of the programmer to ensure that the buffers pointed to by lpRecbuf and lpKeybuf are big enough.
If lpRecbuf is NULL then the record will not be loaded but the key will still be returned. This can improve performance if all the information required is contained in the key.