EssOtlSetQueryHint

Changes the contents (pMemberArray) of an existing query hint; applies only to Release 9.3 or higher aggregate storage databases.

Syntax

ESS_FUNC_M EssOtlSetQueryHint (hOutline, hintNum, numMembers, pMemberArray);
ParameterData TypeDescription

hOutline

ESS_HOUTLINE_T

Outline context handle (input).

hintNum

ESS_SHORT_T

Query hint number (input).

numMembers

ESS_SHORT_T

Number of members in the array provided - usually the number of real dimensions in the outline (input???)

pMemberArray

ESS_PHMEMBER_T

An array of members for the hint. Usually the array has one member per real dimension, with NULL used for dimensions that are not part of the hint. This array needs to be allocated. (Input)

Notes

Return Value

Returns 0 if successful.

Example

 ESS_STS_T         sts = ESS_STS_NOERR;
 ESS_HOUTLINE_T    hOutline = ESS_NULL;
 ESS_SHORT_T       nmHints = 0;
 ESS_SHORT_T       i, j, hintNum;
 ESS_HMEMBER_T     hMember[10]; /* (nm real dimensions) < 10 */

 /* clear array just to be safe */
 memset(hMember, 0x00, 10*sizeof(ESS_HMEMBER_T));

 /* Code to assign hOutline variable omitted */
 /* Code to assign hintNum variable omitted */
   
 sts = EssOtlGetNumQueryHints(hOutline, &nmHints);
 if (sts) return sts;  /* error out */

 if (hintNum <= nmHints)
 {
  sts = EssOtlGetQueryHint(hOutline, hintNum, 10, hMember);
  if (sts) return sts;  /* error out */

  for (j = 0; j < 10; j++)
  {
   /* Code to inspect and change hMember[j] omitted */
  }

  sts = EssOtlSetQueryHint(hOutline, hintNum, 10, hMember);
  if (sts) return sts;  /* error out */
  printf("Query-Hint number: (%d) updated\n", hintNum);
 }
 else
 {
  printf("Query-Hint number: (%d) does not exist\n", hintNum);
 }

See Also