C Examples: DbiGetIndexDesc

<< Click to Display Table of Contents >>

Navigation:  »No topics above this level«

C Examples: DbiGetIndexDesc

Return to chapter overview

Get the name and the amount of fields for the index open on the current cursor.

IXDesc must be of sufficient size to hold the index description. This example uses the following input:
         fDbiGetIndexDesc(hCur, Buffer);

DBIResult fDbiGetIndexDesc(hDBICur hTmpCur, pCHAR IXDesc)

{

   DBIResult   rslt;

   IDXDesc     IdxDesc;

   rslt = Chk(DbiGetIndexDesc(hTmpCur, 0, &IdxDesc));

   wsprintf(IXDesc, "Index name: %s; Fields in Key: %d", IdxDesc.szName,

               IdxDesc.iFldsInKey);

   return rslt;

}