Denying Access Database

Please support our Visual Basic 4 / 5 / 6 advertiser: Programming Forums - DaniWeb Sister Site
Reply

Join Date: Jun 2007
Posts: 68
Reputation: RahulV is an unknown quantity at this point 
Solved Threads: 0
RahulV's Avatar
RahulV RahulV is offline Offline
Junior Poster in Training

Denying Access Database

 
0
  #1
Mar 26th, 2009
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.
Reply With Quote Quick reply to this message  
Join Date: Nov 2007
Posts: 140
Reputation: jonifen is an unknown quantity at this point 
Solved Threads: 15
jonifen jonifen is offline Offline
Junior Poster

Re: Denying Access Database

 
0
  #2
Mar 26th, 2009
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...)
Reply With Quote Quick reply to this message  
Join Date: Jun 2007
Posts: 68
Reputation: RahulV is an unknown quantity at this point 
Solved Threads: 0
RahulV's Avatar
RahulV RahulV is offline Offline
Junior Poster in Training

Re: Denying Access Database

 
0
  #3
Mar 27th, 2009
Originally Posted by jonifen View Post
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 ?
Reply With Quote Quick reply to this message  
Join Date: Nov 2007
Posts: 140
Reputation: jonifen is an unknown quantity at this point 
Solved Threads: 15
jonifen jonifen is offline Offline
Junior Poster

Re: Denying Access Database

 
0
  #4
Mar 27th, 2009
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.
Reply With Quote Quick reply to this message  
Join Date: Mar 2009
Posts: 832
Reputation: vb5prgrmr will become famous soon enough vb5prgrmr will become famous soon enough 
Solved Threads: 152
vb5prgrmr vb5prgrmr is offline Offline
Practically a Posting Shark

Re: Denying Access Database

 
0
  #5
Mar 28th, 2009
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
If anyone has helped you solve your problem, please mark your thread as solved.

Thanks
Reply With Quote Quick reply to this message  
Join Date: Apr 2007
Posts: 5
Reputation: zela is an unknown quantity at this point 
Solved Threads: 0
zela zela is offline Offline
Newbie Poster

Re: Denying Access Database

 
0
  #6
May 6th, 2009
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
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the Visual Basic 4 / 5 / 6 Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC