Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Advantage CA-Clipper Guide v6.11 - ax_dbfdecrypt() http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 AX_DBFDecrypt()
 Decrypts a previously encrypted table
------------------------------------------------------------------------------

 Syntax

     AX_DBFDecrypt() -> logical

 Returns

     Returns TRUE (.T.) if the table is successfully decrypted. Returns
     FALSE (.F.) if not. If .F. is returned, the error code returned from
     the AX_Error() function will give you more information as to why the
     operation failed.

 Description

     AX_DBFDecrypt() decrypts all records in the table and writes them
     in the unencrypted format.  It also removes all password related
     information from the table header.  After the table is decrypted,
     a different encryption password can be set on the table. This
     function uses the password value set in the USE...PASSWORD command,
     SET PASSWORD TO command or as set by the AX_SetPassword() function.
     The password value will be cleared upon successful completion of
     AX_DBFDecrypt().

     Note:  You must have EXCLUSIVE use of the target table
     before calling this function.

     Note: AX_DBFDecrypt() is illegal if performed within a transaction.
     If AX_DBFDecrypt() is called while within a transaction, a runtime error
     will occur.

 Example

     // Open TEST.DBF and set SECRET as the encryption password for this
     //   work area.  Then, decrypt TEST.DBF
     USE test VIA "DBFCDXAX" PASSWORD "SECRET" EXCLUSIVE

     ? "Decrypting TEST.DBF: "
     ?? iif( AX_DBFDecrypt(), "OK", "ERROR" )

     // Open TEST2.DBF and set BOGUS as the encryption password for this
     //   work area.  Then, decrypt TEST2.DBF.
     USE test2 VIA "DBFNTXAX" NEW EXCLUSIVE
     AX_SetPassword( "BOGUS" )

     ? "Decrypting TEST2.DBF: "
     ?? iif( AX_DBFDecrypt(), "OK", "ERROR" )


See Also: AX_DBFEncrypt()

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson