Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Protect Access 2016 database with password

Posted on 2016-09-25
6
Medium Priority
?
128 Views
Last Modified: 2016-09-28
I encrypted the database with a password, however, I want to be able to open the database with a command line which should include the password, because I see no other way to protect the application except for using a password. Does anyone have a suggestion how I can include the database password in the command line?
0
Comment
Question by:Moshe Singer
6 Comments
 
LVL 40

Expert Comment

by:PatHartman
ID: 41815320
If you include the password in the command line, how does that protect the database?
0
 
LVL 13

Expert Comment

by:Máté Farkas
ID: 41815535
Yes it is possible to provide the password when you open the database file in Access:

C:\<path to office>\MSACCESS.EXE /pwd <password> YourDatabase.mdb

Open in new window

0
 

Author Comment

by:Moshe Singer
ID: 41816230
thanks Mate Farkas
if you try this, you will see that  it is not possible
"pwd" is not working for a "Database Password"


And for PatHartman
the Command line I can close in many ways, it can be a vb project, and some other ways
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
LVL 2

Accepted Solution

by:
Saadia Attias earned 2000 total points
ID: 41817942
May be try to use this code each time to want to open the database.
It is not a command shell one but you can set it on the database and let autoexecute it each time you will open it.
Good luck

Public Sub SetDatabasePasswordRunCmd(strSourcePath As String)

    ' Define Variables
    Dim accApp As New Access.Application
 
    ' Open the Source database in Exclusive mode
    accApp.OpenCurrentDatabase strSourcePath, True
 
    ' Invoke the "Set/Unset Database Password" dialog
    accApp.DoCmd.RunCommand acCmdSetDatabasePassword
 
    ' Cleanup Variables
    accApp.Quit acQuitSaveNone
    Set accApp = Nothing
 
End Sub
0
 

Author Comment

by:Moshe Singer
ID: 41820146
how i use to code to Unset Database Password?
0
 
LVL 40

Expert Comment

by:PatHartman
ID: 41820351
Try starting a new question.  This one is closed.
0

Featured Post

When ransomware hits your clients, what do you do?

MSPs: Endpoint security isn’t enough to prevent ransomware.
As the impact and severity of crypto ransomware attacks has grown, Webroot fought back, not just by building a next-gen endpoint solution capable of preventing ransomware attacks but also by being a thought leader.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Traditionally, the method to display pictures in Access forms and reports is to first download them from URLs to a folder, record the path in a table and then let the form or report pull the pictures from that folder. But why not let Windows retr…
Windows Explorer let you handle zip folders nearly as any other folder: Copy, move, change, and delete, etc. In VBA you can also handle normal files and folders, but zip folders takes a little more - and that you'll find here.
Using Microsoft Access, learn some simple rules for how to construct tables in a relational database. Split up all multi-value fields into single values: Split up fields that belong to other things into separate tables: Make sure that all record…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…
Suggested Courses

916 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question