Password

<< Click to Display Table of Contents >>

Navigation:  Apollo VCL Components > Apollo VCL Component Reference > TApolloTable > TApolloTable Properties >

Password

Declaration

property Password: String;

Description

Defines an encoding key to be used in encrypting and decrypting data records in the current table. The maximum length of the key is 8 characters. Once a password is set, all records written to the current table are encrypted using this key. Any encrypted records that are read will also use the key for decrypting.

 

image\tip.gif Memo data contained in DBT files cannot be encrypted since the .DBT format does not support binary data storage. FPT and SMT memo files are encrypted.

 

image\tip.gif WARNING: The encoding key is never stored in the table or internally in Apollo in its virgin form. If you do not have the encoding key to the table, the data cannot be decrypted. If soliciting encoding keys from a user, please ensure that the user fully understands the consequences of forgetting an encoding key.

 

If you wish to encrypt or decrypt all records in a table, set the key using this property or the SetPassword method and then call DbfEncrypt or DbfDecrypt.

image\tip.gif To turn off record-level encrypting, pass this parameter as a NULL string ('' or #0).

Delphi Example

// Browse an encrypted table 

with ApTbl do

begin

 DisableControls; 

 Open; 

 PassWord := 'EVH5150';

  // Important step!

 Refresh;

 EnableControls; 

end;

C++Builder Example

// Browse an encrypted table

ApTbl->DisableControls();

ApTbl->Open();

ApTbl->PassWord = "EVH5150";

// Important step!

ApTbl->Refresh();

ApTbl->EnableControls();

See Also

SetPassword, DbfDecrypt, DbfEncrypt