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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to password protect a VFP 6.0 database

Status
Not open for further replies.

rnathan

Programmer
Jun 27, 2002
41
0
0
US
Hi

I have a DB (.dbc) in VFP 6.0 that needs to be password protected. Can someone help me on this?

Thanks

Rita
 
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.

Mike Krausnick
 
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' :)
 
Rita,

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.

Mike


Mike Lewis
Edinburgh, Scotland
 
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.

Rick
 

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.

Rita
 
Rita,

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.

Mike


Mike Lewis
Edinburgh, Scotland
 
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.

Rick
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top