Hi
There are many ways..
1. You can make the table extensions different from .DBF
That way, people will not know that they are VFP tables. WHen you open
USE myTable.FBD with extension for example will make you open. But this will protect only against accidetal opening by browing the tables. This will not safeguard against malicious openings of using the same syntax in command window.
2. Stop modifications... You can also allow the tables to be browsed and viewed. But you can protect it against editing, deleting and inserting new data by using triggers.
Make the tables part of a DBC. Then use insert triggers, delete triggers and update triggers.
In the trigger routine.. use the first command as..
IF VARTYPE(gcPass) = "U"
RETURN .f.
ELSE
IF !gcPass
RETURN .f.
ENDIF
ENDIF
where gcPass is a global variable specified in your main.prg and initialised as gcPass = .t.
The above code will avoid modifications to tables unless a gcPass=.t. is first created in the command window.
If you application returns to VFP6 command window, make sure you set that gcPass=.f. before returning, so that the variable is not set for direct use.
But as programmer, you know how to handle this from command window.
3. Yet another way to allow modifications but catch from errors...
Create a checksum field in all your tables and ensure that the update/insert routines write this field with correct vales.
SO you can just browse for unmatched records to know, that it is all direct insertions by culprits. If you do directly, you will know to set the checksum field correctly.
4. Encrypted field values is yet another way - more complicated, but more safer. But does not protect against modifications.
5. You can hide and unhide tables in single user applications (I would not recommend this approach, since as you grow to multiuser approach, that fails)
There copuld be more which may not come quick to my mind now.
____________________________________________
ramani - (Subramanian.G) 