http://www.ClipX.Net [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
/* The SETUP.C program must be compiled and run before this example */
/* can be executed. */

#include <stdio.h>
#include "pxengine.h"

#define TABLENAME  "table"

int main(void)
{
  FIELDHANDLE fldHandle;
  TABLEHANDLE tblHandle;
  char        fieldType[BUFSIZ];
  PXCODE      pxErr;

  PXInit();
  PXTblOpen(TABLENAME, &tblHandle, 0, 0);
  PXFldHandle(tblHandle,"Field 1", &fldHandle);

  /* Get field type from the field handle. */

  if ((pxErr = PXFldType(tblHandle, fldHandle, BUFSIZ, fieldType))
    != PXSUCCESS)
    printf("%s\n", PXErrMsg(pxErr));
  else
    printf("Field handle %d has field type of %s\n",
      fldHandle, fieldType);

  PXTblClose(tblHandle);
  PXExit();
  return(pxErr);
}
.

Online resources provided by: http://www.ClipX.Net --- NG 2 HTML conversion by Dave Pearson