home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 5 / 05.iso / a / a006 / 2.ddi / CEXAM.ZIP / FLDTYPE.C < prev    next >
Encoding:
C/C++ Source or Header  |  1991-03-11  |  672 b   |  29 lines

  1. #include <stdio.h>
  2. #include "pxengine.h"
  3.  
  4. #define TABLENAME        "table"
  5.  
  6. int main(void)
  7. {
  8.     FIELDHANDLE fldHandle;
  9.     TABLEHANDLE tblHandle;
  10.     char fieldType[BUFSIZ];
  11.     int pxErr;
  12.  
  13.     PXInit();
  14.     PXTblOpen(TABLENAME, &tblHandle, 0, 0);
  15.     PXFldHandle(tblHandle,"Currency Field", &fldHandle);
  16.  
  17.     /* Get field type from field handle */
  18.     if ((pxErr = PXFldType(tblHandle, fldHandle, BUFSIZ, fieldType))
  19.     != PXSUCCESS)
  20.         printf("%s\n", PXErrMsg(pxErr));
  21.     else
  22.         printf("Field handle %d has field type of %s\n", 
  23.             fldHandle, fieldType);
  24.  
  25.     PXTblClose(tblHandle);
  26.     PXExit();
  27.     return(pxErr);
  28. }
  29.