TAdsTable.AdsDecryptTable

Advantage TDataSet Descendant

Decrypts an entire table.

Syntax

procedure AdsDecryptTable;

Description

AdsDecryptTable will traverse the entire table and decrypt all records with the password set via AdsEnableEncryption. Use of this function requires exclusive use of the table. If a record in the table is already unencrypted, it will be skipped.

The encryption information in the table header will be cleared automatically after the decrypt table operation has completed. Encryption will be disabled after the decrypt table operation has completed; that is, subsequent updates to the records will be written in unencrypted format.

Decrypting a table within a transaction is not allowed.

Note AdsDecryptTable 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

AdsTable1.Exclusive := TRUE;

AdsTable1.Active := TRUE;

AdsTable1.AdsEnableEncryption( 'secret' );

AdsTable1.AdsDecryptTable;

See Also

AdsEnableEncryption

AdsEncryptTable