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

  1. program PswAdd;
  2. uses PXEngine;
  3.  
  4. const TableName = 'Table';
  5.       NetDir    = '';
  6.       NetType    = NotOnNet ;
  7.       Password  = 'Password';
  8.  
  9. var   PxErr: Integer;
  10.       Protected: Boolean;
  11.  
  12. begin
  13.   PX(PXNetInit(NetDir, NotOnNet , DefUserName));
  14.   PX(PXTblProtected(TableName, Protected));
  15.  
  16.   if Protected then
  17.   begin
  18.     (* Submit password to system if table protected *)
  19.     PxErr := PXPswAdd(Password);
  20.     if PxErr <> PxSuccess
  21.     then Writeln(PxErrMsg(PxErr));
  22.   end;
  23.  
  24.   PX(PXExit);
  25. end.
  26.