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

  1. program PswDel;
  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.     PxErr := PXPswAdd(Password);
  18.  
  19.   (* Open encrypted table and when done with table, delete password
  20.      from system, if necessary
  21.   *)
  22.   if Protected then
  23.   begin
  24.     PxErr := PXPswDel(Password);
  25.     if PxErr <> PxSuccess then
  26.       Writeln(PxErrMsg(PxErr));
  27.   end;
  28.  
  29.   PX(PXExit);
  30. end.
  31.  
  32.