


7.3.2 AcuODBC Hidden Directive
The AcuODBC Hidden directive allows you to hide specific data items from end users, while providing normal access to other data items. When placed immediately before a data item in an FD, this directive "hides" the item from end users. The Hidden attribute applies only to the next data item with a pic clause and not to group items. Subsequent data items return to normal read-write access.
For example, in the following FD, only CUSTOMER-NAME is hidden from users. To hide CUSTOMER-PHONE as well, you must add a second Hidden directive.
$XFD COMMENT ACUODBC HIDDEN
05 CUSTOMER-INFO.
10 CUSTOMER-NAME PIC X(20)
10 CUSTOMER-PHONE PIC X(9)
Syntax
$XFD COMMENT ACUODBC HIDDEN
This directive is useful for hiding
data like passwords, telephone numbers,
financial information--whatever information you
do not want users to see. Be aware that some
programs don't work correctly if key fields are hidden. For instance,
Microsoft
Access returns an error like "Invalid field definition in
definition of index of
relationship," if you hide key fields. For this reason, it is best
not to hide
fields that are part of any index. Instead, you can make these fields
read-only
so that your users cannot modify them.
If you add the Hidden directive to the FD, you should use the "xfdcrypt" utility included with AcuODBC to encrypt your XFDs. Otherwise, users could remove this directive to gain access to privileged fields.
To encrypt an XFD, enter the following at the DOS prompt:
xfdcrypt infile.xfd
This utility encrypts
"infile.xfd" and places the encrypted file in the XFD
directory, along side the XFD. Distribute only files with the
".efd" extension
to your end users (or XFDs that were not encrypted in the first place).
Users
cannot modify ".efd" files, so your hidden data remains
hidden. If you need to
view or modify the EFDs or XFDs, you can access the original
".xfd" files on
the development machine.