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

foxpro for dos

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
how to lock the dbf file for user not to browse the data
 
None of the FoxPros have any built-in security capabilities. One way to prevent casual "browsing" is to encrypt the data in critical fields. Of course if you want to prevent any access outside of your program(s), then you'll probably have to move up to a real Client-Server database (like MS SQL Server, Oracle, Sybase, etc.). An intermediate possibility is full table encrytption by a 3rd party utility like Xitech's Cryptor, and others.

Note: Using the new Database events in VFP 7.0, you can do your own encryption and limit access through normal methods.

Rick
 
In the 26 environment, you can also use the SET FIELDS command to allow access to only fields you want the user to see. But if user has access to Excel, they could always view the data in the dbf in the spreadsheet. You might be able to change the file ext name to something like "mydata.dat" instead of "mydata.dbf" this might confuse some versions of Excel and not allow access. If you use this method however, you will need to specify the *exact* file name instead of the *implied* file extention of .dbf. ie. USE mydata.dat

Regards
 
Keeping the Fox development environment off of their systems might slow them down a little.

Dave S.
 
Dave,
Unfortunately there are a number of other ways to view .DBF's and especially non-VFP tables. Quickview which came with some versions of Windows (or in the Plus! pack) did a fine job. I've currently got 3 freeware / share apps that can view and/or update .DBF's on my system. And as mentioned Excel and Access can work with the non-VFP ones "natively" and with the proper ODBC driver all of them.

Rick
 
Oh I totally agree. But if it's Fox they're using, then don't give them easy access to the files. It's just like telling the users to not use certain apps like Solitaire. They will find a way around it, maybe Freecell instead, if they're determined. The best thing to do is encrypt the data, or deny access using something like Zenworks, if the circumstances permit, for end users. If you're trying to hide data from developers on the other hand, that's a whole 'nuther story.

Dave S.
 
I found this one out by accident,

I wrote a minor prog for an old amstrad 1512 many years ago & because of space considerations I put everthing except a header record in a memo field, using a get/set routine.

Recently someone tried to hack this & was most put out because EXCEL couldn't get the link to the memo file & reading it directly was meaningless

Richard
 
I tried to encrypt my data (exp. DBF for LOGIN names and PASSWORDS) so even somebody opens it, they can't read it. I made an algoritam to encrypt it, and also another one to read it. You can make some special formula what only you know. Example, for the first letter of value of the field take the following third code in ASCII code list. for the second one the following 3+1 code, for the third take 3+2 code in ASCII Characters. Yuo can create a function, using DO WHILE command in it for encryption. Just encrypt it before you save the contain of the field. And opposite, convert it to readable form before you read it .
I hope that my suggestion will help you.
 
I already have some routines written that will encrypt and decrypt data as the message by blazblaz describes. I am at work right now but if you are interested, email me and I'll be happy to send them to you. The routines encrypt and decrypt data using a special "key" which is just basically a password. I use the routines to store passwords in my DBF, so even if you open the table with an external viewer all you see is extended characters.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top