Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Access Control outside VFP
Message
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00186079
Message ID:
00186095
Views:
19
>>How do I prevent someone from accessing a .dbf outside of my application? DBF's reside on a Novell server. Anyone with access to the application has access to the .dbf's and could view and alter the .dbf's without going through the application.
>>
>>Is there a property or something that could be set on the .dbf's that would require a password or something like that?
>>
>>Thanks,
>
>Somebody mentioned a couple of days ago to open the dbf with FOPEN and then write a character to the first position. I know in early versions this prevented FoxPro from opening the table (not a table/dbf error). Your app then changes back to CHR(3) before you want to open it. Don't know if this still works.

Problem someone else mentioned with that scheme: if someone's running your app, the DBF is back to normal and others can access it at that time.

This is one of the downfalls of xBase languages. About the only way to keep people from opening it using any program which knows how to open dbfs is by encrypting the data (having encrypt and decrypt functions in your app, so your app can see the data "normally", but anyone else opening the tables sees random-looking garbage.) Obviously there's going to be some performance degradation if you have to decrypt every field as you load it. But I've listened to at least one person (presenting at our Fox User's Group) say they used a 3rd party product (can't remember whether FLL, DLL, or what) which did this encrypting/decrypting automatically throughout your app by turning it on in your startup app, and this person noticed no performance problem.

I'm sorry this isn't as useful as saying "here's how you do it", but at least I can tell you it can be done.

Cheers,
Rich.
Rich Addison, Micro Vane, Inc., Kalamazoo, MI
Relax, don't worry, have a homebrew.
- Charlie Papazian, The New Complete Joy of Home Brewing
Previous
Reply
Map
View

Click here to load this message in the networking platform