home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 5 / 05.iso / a / a007 / 1.ddi / BUFCLOSE.C < prev    next >
Encoding:
C/C++ Source or Header  |  1992-10-15  |  558 b   |  28 lines

  1. /* The SETUP.C program must be compiled and run before this example */
  2. /* can be executed. */
  3.  
  4. #include <stdio.h>
  5. #include "pxengine.h"
  6.  
  7. #define TABLENAME  "table"
  8.  
  9. int main(void)
  10. {
  11.   RECORDHANDLE recHandle;
  12.   TABLEHANDLE tblHandle;
  13.   PXCODE      pxErr;
  14.  
  15.   PXInit();
  16.   PXTblOpen(TABLENAME, &tblHandle, 0, 0);
  17.   PXRecBufOpen(tblHandle, &recHandle);
  18.  
  19.   /* Close a record buffer. */
  20.  
  21.   if ((pxErr = PXRecBufClose(recHandle)) != PXSUCCESS)
  22.     printf("%s\n", PXErrMsg(pxErr));
  23.  
  24.   PXTblClose(tblHandle);
  25.   PXExit();
  26.   return(pxErr);
  27. }
  28.