ctdbGetIdxno
Retrieve the index file number from a index handle.
DECLARATION
NINT ctdbGetIdxno(CTHANDLE Handle)
DESCRIPTION
Retrieves the index file number to be used with c-tree ISAM or low-level index functions.
Returns the index number on success or -1 on failure. If ctdbGetIdxno() function returns -1, the error code can be retrieved by calling the ctdbGetError() function.
RETURN
Value |
Symbolic Constant |
Explanation |
---|---|---|
0 |
NO_ERROR |
No error occurred. |
-1 |
|
ctdbGetDIdxno() failed. You can retrieve the error code by calling ctdbGetError() function. |
See Appendix A for a complete listing of valid c-tree Plus error values.
EXAMPLE
/* retrieve the first key of first index */
TEXT keyval[256];
COUNT idxno = (COUNT)ctdbGetIdxno(ctdbGetIdnex(hTable, 0));
if (FirstKey(idxno, 0), keyval)
printf("FirstKey failed\n");
SEE ALSO
ctdbSwitchInstance(), ctdbSwitchContext(), ctdbGetDatno(), ctdbGetIdxnoByName(), ctdbGetIdxnoByNumber(), ctdbGetError()