Can you be more specific about what you need? Do you want to prevent programmers from modifying the DBC? Do you want prevent users from accessing data in tables referenced in the DBC? Why do you want to password-protect the DBC? It's just a container.
If you are using NT, 2000, or XP you can set permissions
on individual files. If you are using Win9x, you'll need
a third-party application to accomplish what you desire.
Darrell
'We all must do the hard bits so when we get bit we know where to bite'
You can't really password-protect a data file (you can encrypt it, but that's another matter).
You can password-protect your application, so that only recognised users can log on and access your data. But that won't stop a knowledgeable person from bypassing your application and reading the data by some other means.
Also, you asked specifically about password-protecting the DBC. Remember, the DBC doesn't contain the actual data. That is held in DBFs.
If you upgrade to VFP 7/8, you can use the database events to add a password to a table. Unless you encrypt the data though, any hex file viewer could still view the data.
Sorry, I wasn't being specific. I want to prevent users from accessing data in tables referenced in the DBC. My application is password protected. But any knowledgeable person can open a .dbf file in Access or Excel and manipulate the data. I would like to avoid that. Mike Lewis's comments are useful. After reading Mike Krausnick
comments, I also would like to know if it is possible to protect the DB container being modified by other programmers? Thanks for all the comments.
In that case, you really need to encrypt the data. There are several tools available to help you do that. For example, Cryptor is a general-purpose DLL which can encrypt and decrypt any file (not just Foxpro tables) on the fly.
Alternatively, you could write your own encryption scheme. But that would mean substantial changes to your application, as you would have to decrypt every record as soon as you read it, and encrypt it before writing it.
Rita,
Desktop databases were designed to make access to data easy. If you have the kind of requirements you are suggesting, then the best soultion is to go to a client server environment, where the data is isolated and can only be accessed through the server. I'd look into SQL Server - you can still use VFP for your application access, but no one else that doesn't have access to the server will be able to see any of the data.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.