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 v5.5 - ax_dbfencrypt() http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 AX_DBFEncrypt()
 Encrypts a table
------------------------------------------------------------------------------

 Syntax

     AX_DBFEncrypt() -> logical

 Returns

     Returns TRUE (.T.) if the table is successfully encrypted. 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_DBFEncrypt() encrypts an entire table using the password value
     that exists for the work area. The password value is set by the
     USE...PASSWORD command, SET PASSWORD TO command or the AX_SetPassword()
     function.

     Note: AX_DBFEncrypt() is illegal if performed within a transaction.
     If AX_DBFEncrypt() 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, encrypt TEST.DBF
     USE test VIA "DBFCDXAX" PASSWORD "SECRET" EXCLUSIVE

     ? "Encrypting TEST.DBF: "
     ?? iif( AX_DBFEncrypt(), "OK", "ERROR" )

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

     ? "Encrypting TEST2.DBF: "
     ?? iif( AX_DBFEncrypt(), "OK", "ERROR" )


See Also: AX_DBFDecrypt()

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