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_idtype():</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
  Sx_IDtype():

  Syntax:   Sx_IDtype()

  Returns:  Numeric value indicating the type of the current record or
            identity.

                0 - No Identity
                1 - Standard Record
                2 - Encrypted Record

  Description:  This function allows you to determine the type of the
                current identity.  The term "identity" was introduced in
                CA-Clipper 5.2 to reference a record without necessarily
                using a fixed record number.  This provides a means to
                identify a specific record even if it's record number is
                subject to change (as record numbers can do under Paradox).

                At the present time, this function is used primarily as a
                means to detect if the current identity had been previously
                encrypted or not.

  Example:

    // Assume TEST.DBF has 10 records in it already

    LOCAL nType := 0, nCount := 0

    USE test VIA "SIXCDX"         // Open TEST.DBF
    Sx_SetPass( "HOMER" )         // Select a password value
    Sx_DBFencrypt()               // Encrypt all 10 records in TEST.DBF

    Sx_SetPass("")                // Clear the password value
    FOR nCount := 1 To 10         // Now append 10 new records into
      dbAppend()                  //  the database and store some text
      test->LAST := "Testing"     //  into the LAST field
    NEXT

    dbGoTop()                     // Go back to the top of the database
    DO WHILE !eof()               //  and skip through each record to EOF

      ? RecNo()
      nType := Sx_IDtype()        // Get this "identity's" type
      DO CASE
        CASE nType == 0
          ?? ": No Identity!"
        CASE nType == 1
          ?? ": Unencrypted"      // Records 11 thru 20 should display this
        CASE nType == 2
          ?? ": Encrypted"        // Records 1 thru 10 should display this
      ENDCASE
      dbSkip()                    // Move to next record

    ENDDO


See Also: Sx_TableType() Sx_DBFencrypt() Sx_DBFdecrypt()

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