943,791 Members | Top Members by Rank

Ad:
Mar 26th, 2009
0

Denying Access Database

Expand Post »
Hi,
In the VB projects that use Access Databases, its found that the user is able to access the database directly (manually) ie by reaching the file and double clicking it open.
But, what all can i do to prevent the user from directly accessing and using the database? What are the options to do it?
Last edited by RahulV; Mar 26th, 2009 at 12:06 pm.
Similar Threads
Reputation Points: 26
Solved Threads: 0
Junior Poster in Training
RahulV is offline Offline
92 posts
since Jun 2007
Mar 26th, 2009
0

Re: Denying Access Database

You can put a password on the database file so you can't just double click to open it.
Then you would provide the password in your Connection string in VB6 (when connecting to the database) using PWD:flibble (if your password is flibble, that is...)
Reputation Points: 13
Solved Threads: 17
Junior Poster
jonifen is offline Offline
152 posts
since Nov 2007
Mar 27th, 2009
0

Re: Denying Access Database

Click to Expand / Collapse  Quote originally posted by jonifen ...
You can put a password on the database file so you can't just double click to open it.
Then you would provide the password in your Connection string in VB6 (when connecting to the database) using PWD:flibble (if your password is flibble, that is...)
I know that already, but is there any other way or idea ?
Reputation Points: 26
Solved Threads: 0
Junior Poster in Training
RahulV is offline Offline
92 posts
since Jun 2007
Mar 27th, 2009
0

Re: Denying Access Database

Not really - you can't really secure an Access file much other than that. Unless you use some sort of Windows directory access and use the front end under a different user which has permissions to the database path which your usual user does not (hope I've made myself clear?) - unsure if that would work or not.

But I think using the password is as much as you can do - just making the password as secure as possible is best - and when you hardcode the password into the code, use the Chr() commands for the characters instead so it's not easily read if the EXE is read using some sort of reverse engineering method or something.
Reputation Points: 13
Solved Threads: 17
Junior Poster
jonifen is offline Offline
152 posts
since Nov 2007
Mar 28th, 2009
0

Re: Denying Access Database

I have never tried this while using ADO but I do know that DAO does not care what the extension of the file is as it checks for the contents of the file, i.e. change databasename.mdb to databasename.abc. and even with the password this is easy enough to get around by a determined user.

Another way is to encode the file is by something like RSA encryption algorithms. This method would be real secure while your program is not running but when it is there is nothing you can do. I say there is nothing you can do because there are so many programs out there that can watch the system that when you go to write the database to disk even with a fake extension, the user will know what, when, and where you are doing your actions. Then when you open the database these systems/programs will also notify the user of every string/command/byte passed back and forth between the program/db engine/database that they will easily read the password. Then all they have to do is to stop your kill command to delete the decoded database when you are exiting your program and then they will have access to it and all its data.

So in the end, there is only so much you can do but no matter which way you go...

Good Luck
Reputation Points: 156
Solved Threads: 296
Posting Virtuoso
vb5prgrmr is offline Offline
1,670 posts
since Mar 2009
May 6th, 2009
0

Re: Denying Access Database

I sure need someone to help me which is muct like this, I create a connection string as below :

Public Function initdb()
Set ws = DBEngine.Workspaces(0)
Set db = ws.OpenDatabase(App.Path & "\Masterfile.mdb")
Set rs = db.OpenRecordset("Detail", dbOpenTable)
max = rs.RecordCount
Exit Function
End Function
***********************************
But when i lock the access table with password, I don't know how to change the connection string to open the database, would be very grateful if anyone help me.

Zela
Reputation Points: 10
Solved Threads: 0
Newbie Poster
zela is offline Offline
10 posts
since Apr 2007

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in Visual Basic 4 / 5 / 6 Forum Timeline: pause and stopping in vb 08 media player
Next Thread in Visual Basic 4 / 5 / 6 Forum Timeline: SQL problem - simple?





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC