Navigation:  Reference > Commands >

File Protection

Print this Topic Previous pageReturn to chapter overviewNext page

 

This command is used to encrypt, or protect against unauthorized usage, a standard TAS Professional file (Pervasive - Btrieve ONLY).

 

 

OWNER f/c/e Required - This is either the 'password' provided during the original execution of this OWNER command in relation to the specific file, or the new 'password' for this file.  The field must be of A type and cannot be more than 8 characters in length.  If you are going to clear current protection (CLR option), then this needs to be provided so that the program can proceed.  In the case of the set option (SET), then it is needed for future operations.  Once it is set you will need to provide it to the OPENV (Open File) command each time the file is opened.  This can be accomplished in two ways.  You can store the value in a file somewhere (not very safe) or you can ask for the value before opening the file.  Make sure you set the password flag in the appropriate entry field object so that the value entered will not be displayed on the screen.

 

FILE file_num Required - This is the number/handle of the file being set.  The file must currently be opened.

 

what_to_do CLR - Any protection currently provided will be removed.

       SET - The protection will be setup, including encryption if specified (see below).

 

ENC If this is a SET operation then you can choose to encrypt the file also.  This means that if anyone should try to access that file through any other means (debugger, other applications that use Btrieve, etc.) they will not be able to make sense of the data.  If this is being accomplished on an existing file the process may take a considerable length of time depending on the number of records in the file.  To choose this option include ENC in the command.

 

RDOKIf this is a SET operation and this option is included in the command then subsequent programs that access this file, but don't set the OWNER option during the OPENV (Open File) command, will be able to read records from this file but won't be able to update them.

 

       NOTE:  This only works if you don't encrypt the file also.  The OPENV command requires the OWNER value to unencrypt records when they are read.

 

 

COMMENTS

Through the use of this command you can make sure that a file will have a certain level of protection without concern as to what the program may do, or how the user may access the file through utilities.

 

 

SEE ALSO                        

OPENV

 

 


Page url: http://www.cassoftware.com/tas/manual/ownerfileprotect.htm