|
<< Click to Display Table of Contents >> C Examples: DbiGetIndexDescs |
![]() ![]()
|
Get the properties of all the indexes for the table open with the specified cursor
IndexDesc is allocated within the function. This example uses the following input:
fDbiGetIndexDescs(hCur, &pIdxDesc);
DBIResult fDbiGetIndexDescs(hDBICur hTmpCur, pIDXDesc *IndexDesc)
{
DBIResult rslt;
CURProps CurProps;
rslt = Chk(DbiGetCursorProps(hTmpCur, &CurProps));
if (rslt != DBIERR_NONE)
return rslt;
*IndexDesc = (pIDXDesc)malloc(CurProps.iIndexes * sizeof(IDXDesc));
if (IndexDesc == NULL)
return DBIERR_NOMEMORY;
rslt = Chk(DbiGetIndexDescs(hTmpCur, *IndexDesc));
return rslt;
}