Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Restricting Access to Tables

Status
Not open for further replies.

bebbo

Programmer
Dec 5, 2000
621
GB
Can you stop people from opening ".dbf" files within Foxpro and still use them in a program. Basically I'm working on a program which a number of tables hold information. I would like these tables only to be modified within my program. Is this possible???
 
There's a simple trick that I utilize for your not so savvy FoxPro user. I change the table extension, eg: mytable.dbf => mytable.dat. There are a couple of considerations you need to take care of when you do this though (when you USE the table in your codes, you must explicitly specify name and extension mytable.dat). The result of this trick is that a DIR only displays files with .DBF extension so your tables are "hidden".

You might also want to develop your own algorithm for data encryption/decryption - which you run upon starting and closing your application. Has serious implications though if your system crashes during the process. But some extensive coding can even fix that.

Lastly, you might want to get hold of some third party encryption tool that does basically the same thing I suggested on encryption/decryption.
 
If the tables are in a Database (.DBC), then you can use the triggers to add code to prevent this. In fact in VFP 7.0 you can use the new database events to even prevent the files from being opened.

Rick
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top