home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 5 / 05.iso / a / a006 / 1.ddi / PASEXAM.ZIP / FLDBLANK.PAS < prev    next >
Encoding:
Pascal/Delphi Source File  |  1991-03-11  |  723 b   |  32 lines

  1. program FldBlank;
  2. uses PXEngine;
  3.  
  4. const TableName = 'Table';
  5.  
  6. var   PxErr: Integer;
  7.       TblHandle: TableHandle;
  8.       RecHandle: RecordHandle;
  9.       FldHandle: FieldHandle;
  10.       Blank: Boolean;
  11.  
  12. begin
  13.   FldHandle := 1;
  14.  
  15.   PX(PXInit);
  16.   PX(PXTblOpen(TableName, TblHandle, 0, False));
  17.   PX(PXRecBufOpen(TblHandle, RecHandle));
  18.   PX(PXRecGet(TblHandle, RecHandle));
  19.  
  20.   (* See if the field is blank *)
  21.   PxErr := PXFldBlank(RecHandle, FldHandle, Blank);
  22.   if PxErr <> PxSuccess then
  23.     Writeln(PxErrMsg(PxErr))
  24.   else if Blank then
  25.          Writeln('Field is blank')
  26.        else Writeln('Field is not blank');
  27.  
  28.   PX(PXRecBufClose(RecHandle));
  29.   PX(PXTblClose(TblHandle));
  30.   PX(PXExit);
  31. end.
  32.