DbiGetIndexDesc

<< Click to Display Table of Contents >>

Navigation:  »No topics above this level«

DbiGetIndexDesc

Return to chapter overview

C syntax

DBIResult DBIFN DbiGetIndexDesc (hCursor, iIndexSeqNo, pidxDesc);

Delphi syntax

function DbiGetIndexDesc (hCursor: hDBICur; iIndexSeqNo: Word; var idxDesc: IDXDesc): DBIResult stdcall;

Description

DbiGetIndexDesc retrieves the properties of the given index associated with hCursor.

Parameters

hCursor                Type: hDBICur                (Input)
Specifies the cursor handle.

iIndexSeqNo                Type: UINT16                (Input)
Specifies the ordinal number of the index in the list of open indexes of the cursor. DbiGetIndexSeqNo can be called to obtain this number for a given index. If iIndexSeqNo is 0, the properties of the active index are returned.

pidxDesc                Type: pIDXDesc                (Output)
Pointer to the client-allocated IDXDesc structure.

Usage

This function is used to find the properties of an open index for this cursor. Use DbiGetCursorProps to get the number of open indexes (iIndexes). iIndexSeqNo must be between zero and iIndexes.

Note:        If a field map is active, the field numbers in aiKeyFld list the mapped field numbers, however, if a key field is not part of the field map, it is a negative number.

Oracle:                For performance reasons, bPrimary is not set in the FLDDesc structure.  To determine if a primary index exists on a table, use DbiSetProp with the curGETEXTENDEDINFO property before calling DbiGetIndexDescs.

Prerequisites

A valid cursor handle must be on one or more open indexes.

DbiResult

Meaning

DBIERR_NONE

The properties of the specified index were returned successfully.

DBIERR_INVALIDHNDL

The specified handle is invalid or NULL.

DBIERR_NOTINDEXED

Table has no associated indexes.

DBIERR_NOSUCHINDEX

iIndexSeqNo is invalid.

See also

DbiOpenIndex, DbiCloseIndex, DbiGetCursorProps, DbiGetIndexSeqNo, DbiOpenIndexList, DbiGetIndexDescs