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

  1. #include <stdio.h>
  2. #include "pxengine.h"
  3.  
  4. #define TABLENAME        "table"
  5.  
  6. int main(void)
  7. {
  8.     TABLEHANDLE tblHandle;
  9.     RECORDHANDLE recHandle;
  10.     FIELDHANDLE fldHandle = 1;
  11.     int pxErr;
  12.     int Blank;
  13.  
  14.     PXInit();
  15.     pxErr = PXTblOpen(TABLENAME, &tblHandle, 0, 0);
  16.     PXRecBufOpen(tblHandle, &recHandle);
  17.     PXRecGet(tblHandle, recHandle);
  18.  
  19.     /* See if the field is blank */
  20.     if ((pxErr = PXFldBlank(recHandle, fldHandle, &Blank)) 
  21.     != PXSUCCESS)
  22.         printf("%s\n", PXErrMsg(pxErr));
  23.     else 
  24.     {
  25.         if (Blank) 
  26.             printf("Field is blank\n");
  27.         else
  28.             printf("Field is not blank\n");
  29.     }
  30.  
  31.     PXRecBufClose(recHandle);
  32.     PXTblClose(tblHandle);
  33.     PXExit();
  34.     return(pxErr);
  35. }
  36.