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!

Encrypt Access Database from VB? 2

Status
Not open for further replies.

MoaTad

Programmer
Jun 7, 2002
27
US
Hi All,

I am working on a VB6 application that uses an Access 2000 database. It has become painfully obvious to me how easy it will be for my users to break the database password and open the database directly in Access and manipulate the data in the tables.
I am considering installing an encrypted version of the mdb file and having my application unencrypt and encrypt it at the start and end of the program.
I also am considering encrypting data in the tables, as we already do in the user table, but I would rather not do this because the program makes database calls all over the place in a variety of ways. (I didn't write the bulk of the program.)
Any ideas on what is a good way to secure the database?

Thanks
 
I would use a blowfish algorithm to encrypt the whole file which you can do from a vb form. Basically use the form to open and close the database while at the sametime encrypting and decrypting.

Email me @ simoncpage@hotmail.com and I'll return blowfish class for you.

Simono


 
Hi simoncpage,

i know encryption algorithms but in fact i don't know their names.
Which is a blowfish?I like that name :)
Guess i'll email you cause i'd really like to know one algorithm with that name and by the way, i'll give you a star for that funny but professional post .

good work ===================
* Marta Oliveira *
===================
marta100@aeiou.pt
-------------------
CPC_TA- Braga
-------------------
Portugal
===================
 
You can also use the JRO Object to encrypt the database.
You'll need to include a reference to the Jet and Replication Object into the project.

Sub JROEncryptDatabase()

Dim je As New JRO.JetEngine

' Use compact to create a new, encrypted version of the database
je.CompactDatabase "Data Source=C:\nwind.mdb;", _
"Data Source=C:\newnwind.mdb;Jet OLEDB:Encrypt Database=True"

End Sub

Good Luck
--------------
As a circle of light increases so does the circumference of darkness around it. - Albert Einstein


 
Hi CajunCenturion,
Thanks for the idea, but unless I am mistaken, this type of encryption only prevents a user from opening the database in applications other than Microsoft Access. If the database file is opened in Access, then the user can see the contents normally. Since it is easy for anyone to purchase tools to crack a Microsoft Access password, I am looking for a way that will prevent them from opening the file in Access if they are successful in cracking the password.


Thanks
 
RayRayRay

The best way is to use a strong encryption algorithm to encrypt and decrypt the file - which hence cannot be cracked unless someone spends years doing a brute force attack. I had the same problem with Excel as microsoft products are very poor when it comes to security.

Email me @ simoncpage@hotmail.com and I'll send you the blowfish class which you can impliment easily.

HTH

Simon
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top