Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- SIx Driver RDD v3.00 - Reference Guide - <b>sx_dbfencrypt():</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
  Sx_DBFencrypt():

  Syntax:   Sx_DBFencrypt( [cKeyVal] )

        cKeyVal = Optional password code to use for encrypting the table.
                  If no password value is specified, the value set by the
                  Sx_SetPass() function (or the USE...PASSWORD command) for
                  the current workarea is used.

  Returns:   Logical value.  TRUE (.T.) if the table is successfully
             encrypted, FALSE (.F.) if not.

  Description:  Encrypts an entire database file using the specified password
                value.  If no password value is passed, the password
                previously set by Sx_SetPass() is used.

                Using this function is the only way to make Sx_TableType()
                return a 2 (Encrypted) value for a table.

  Example:

    // Open TEST.DBF and set FOOBAR as the encryption password for this
    // workarea.  Then, encrypt TEST.DBF

    USE test VIA "SIXCDX" PASSWORD "foobar" EXCLUSIVE
    ? "Encrypting TEST.DBF: "
    ?? iif( Sx_DBFencrypt(), "OK", "ERROR" )


    // Open TEST2.DBF and set BOGUS as the encryption password for this
    // workarea.  Then, encrypt TEST2.DBF.

    USE test2 VIA "SIXCDX" NEW EXCLUSIVE
    Sx_SetPass( "BOGUS" )
    ? "Encrypting TEST2.DBF: "
    ?? iif( Sx_DBFencrypt(), "OK", "ERROR" )

  NOTE:  You must have EXCLUSIVE use of the target database file before
         calling this function.


See Also: Sx_DBFdecrypt() Sx_Decrypt() Sx_Encrypt() Sx_SetPass() Sx_TableType()

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