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

  1. #include <stdio.h>
  2. #include "pxengine.h"
  3.  
  4. #define NETDIR          "\\pdox35"
  5. #define TABLENAME       "table"
  6.  
  7. int main(void)
  8. {
  9.     TABLEHANDLE tblHandle;
  10.     int pxErr;
  11.     char userName[BUFSIZ];
  12.  
  13.     PXNetInit(NETDIR,NOVELLNET,DEFUSERNAME);
  14.     PXTblOpen(TABLENAME, &tblHandle, 0, 0);
  15.  
  16.     /* Determine which user is causing a locking error */
  17.     if ((pxErr = PXNetErrUser(BUFSIZ, userName)) != PXSUCCESS)
  18.         printf("%s\n", PXErrMsg(pxErr));
  19.     else
  20.         printf("The user causing the network error is %s\n", userName);
  21.  
  22.     PXTblClose(tblHandle);
  23.     PXExit();
  24.     return(pxErr);
  25. }
  26.