home *** CD-ROM | disk | FTP | other *** search
- #include <stdio.h>
- #include "pxengine.h"
-
- #define TABLENAME "table"
- #define NETDIR ""
- #define NETTYPE NOTONNET
-
- int main(void)
- {
- RECORDHANDLE recHandle;
- TABLEHANDLE tblHandle;
- LOCKHANDLE lckHandle;
- int pxErr;
-
- PXNetInit(NETDIR,NETTYPE,DEFUSERNAME);
- PXTblOpen(TABLENAME, &tblHandle, 0, 0);
- PXRecBufOpen(tblHandle, &recHandle);
-
- /* Attempt to lock current record */
- if ((pxErr = PXNetRecLock(tblHandle, &lckHandle)) != PXSUCCESS)
- printf("%s\n", PXErrMsg(pxErr));
- else
- PXNetRecUnlock(tblHandle, lckHandle);
-
- PXRecBufClose(recHandle);
- PXTblClose(tblHandle);
- PXExit();
- return(pxErr);
- }