QUOTE(marsden @ Jun 1 2006, 05:32 PM)

I agree with this to an extent. The problem with doing the above is that all .mdb files will call your program if you set it up this way. I would suggest moving your .mdb to a hidden folder so that no one will be able to see it therein stoping anyone from opening it.
Not exactly. Keeping a file hidden will make things more complicated as the user might want to move the program and, without notice, leaves the .mdb file behind. Besides, you need to manually make the file hidden or else you are breaching software trust laws.
If you don't mind the .mdb file to be edited, keep it visible and include a readme file to tell the user to move along with the program.
If not, do the same, but include these step:
1. Design or get the source code of an encrytion program and add that to your program.
2. Encrypt the .mdb file
3. Program the code so that you create a cache of the decrypted file. READ ON FIRST!!!
4. Add this code at the program's startup right after finishing the chache:
CODE
Dim FileNum As Integer 'Put this into the declararions section'
FileNum= FreeFile
Open 'Inset code here' For Input as #FileNum
5. Those who understand file acess will truly laugh at this. You keep the file used by the program and it can hardly be acessed except by some proffesional programmer.
6. Just before you close the program, add
CODE
Close #FileNum
or else you will need to restart the computer before being able to reuse the application again.
Alternatively:
1. Use Microsoft Acess to lock the .mdb file with a password. In Tools > Options menu. It's not hard to find from there.
2. In the VB development, right click on the tool bar and select Components... and search for Microsoft ADO Data Control. Use it in replacement of the default Data Control. It's a but different but the basics is still the same. Experiment with it for a while. Adapt the program to the control.
3. Just before acessing the file add:
CODE
Adodc1.password = 'password
to the code. Note: replace the name of the component as necessary.
This method is simpler but causes some campatability issues. I will only reccomend this to people with experience in the field of compatibility (or you could take the fun out by including the .dll file of the ADO component into the same directory as the program)

.
Comment/Reply (w/o sign-up)