To work around this behavior, you can use several third-party products to encrypt FoxPro table files while allowing the data to be modified. You can also write a program to encrypt Visual FoxPro table files.
Using Visual FoxPro to encrypt .dbfsIf a .dbf file does not need to be modified, you can add it to your project list and not mark it for exclusion. When you build an encrypted .exe file, the .dbf data will be included in it. You do not need to physically copy the .dbf file to the subdirectory where the .exe file will be found. When you run the .exe file, the .dbf information can be accessed, but it cannot be changed. Decryption of the .dbf file is automatic when the .exe file is run.
Beginning in Visual FoxPro 7.0, you can use the Crypt.vcx Visual FoxPro Foundation Class to encrypt data. The cryptapi class that is located in the ...\Ffc\_Crypt.vcx foundation class library provides access to the Windows Crypto API routines so you can encrypt strings, data, or files in your Visual FoxPro Applications. For more information on the _Crypt.vcx and the _crytapi class, see search the Help file for "_Crypt.vcx."
Third-party products to encrypt .dbf files
Writing a program to encrypt .dbf filesMany Visual FoxPro reference books contain sample code for different methods of encrypting and decrypting database files.
For examples, see these books:
"FoxPro 2.0 Power Tools," Malcolm C. Rubel, pages 938-942, Bantam Books, 1991, ISBN 0-553-35294-6
"Tom Rettig's FoxPro Handbook," Tom Rettig, pages 622-625, Bantam Books, 1990, ISBN 0-553-34937-6
"FoxPro 2.5 Advanced Developer's Handbook", Pat Adams and Jordan Powell, pages 222-228, Brady Publishing, 1993, ISBN 0-13-325341-4