TAdsTable/TAdsQuery.AdsDecryptRecord

Advantage TDataSet Descendant

Decrypts the current record after encryption has been enabled.

Syntax

procedure AdsDecryptRecord;

Description

AdsDecryptRecord decrypts the current record in this table with the current password set via AdsEnableEncryption . If the record is not encrypted, it is ignored.

Note AdsDecryptRecord is only applicable with free tables. The encryption process is done automatically with database tables. Data dictionary administrative access is required to encrypt or decrypt database tables. See Advantage Data Dictionary for more information.

Example

This example encrypts all records in the table and then decrypts all of them.

AdsTable1.Active := TRUE;

AdsTable1.AdsEnableEncryption( 'secret' );

AdsTable1.First;

While AdsTable1.EOF = FALSE Do

Begin

AdsTable1.AdsEncryptRecord;

AdsTable1.Next;

End;

 

AdsTable1.First;

While AdsTable1.EOF = FALSE Do

Begin

AdsTable1.AdsDecryptRecord;

AdsTable1.Next;

End;

See Also

AdsEnableEncryption

AdsIsRecordEncrypted

AdsIsEncryptionEnabled

AdsEncryptRecord