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

Avoid access in .mdb 1

Status
Not open for further replies.

groner

Programmer
May 18, 2002
23
RO
Hi pople !
I have made a database using VB6 with VisDataManager support . I want to avoid that the user to open the database using MS Access programme or other .
How can I restrict the access to open this (.mdb) database .
Thank you for any sugestion .
 
Can't it just be password protected ?
Greetings,
Rick
 

Set a password for the MDB and then after setting the provider, and just before openning the connection, add theis line:

conn.Properties("Jet OLEDB:Database Password") = "1234abcd"

or in the open method of the connection object, add:

conn.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=myDB.Mdb;Jet OLEDB:Database Password = 1234abcd"
 
How about encrypting the .mdb file itself?

I'm not referring to using Access's encryption, but rather file encryption. I have done this and in my limited experience with it, it works well.

I would recommend changing the file extension from .mdb to something else, although Access will not like the format even if they tried to open it with Access. BlackburnKL
 
For BlackburnKL .
How can I do this ?
 
For CCLINT .
My experience in DataBases it's limited .
I'm work with this code :
Dim myDB As DataBase
Set myDB = OpenDataBase(AppPath)
....
What must be change or append ?
 
For everybody.
How can i protect one file (for example one DB) to delete them from the computer .
 


"What must be change or append"

Open password protected mdb:

Set myDB = Dao_OpenDatabase(AppPath & "\myData.Mdb",False,False,";pwd=XYZ789")

Change Password:
myDB.NewPassword = "ABC123"
 


"How can i protect one file"

Maybe just hide it?

SetAttr App.Path & "\myData.MDB", vbHidden
 
We downloaded one from the internet. I don't remember where we got it, but I can e-mail it to you. You can contact me at BlackburnKL@LDSChurch.org. BlackburnKL
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top