Solved

Protect Access 2016 database with password

Posted on 2016-09-25
6
66 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 34

Expert Comment

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

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
Backup Your Microsoft Windows Server®

Backup all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

 
LVL 2

Accepted Solution

by:
Saadia Attias earned 500 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 34

Expert Comment

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

Featured Post

Backup Your Microsoft Windows Server®

Backup all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

Question has a verified solution.

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

As a financial services provider, your business is impacted by two of the strictest federal regulations on record: the Sarbanes-Oxley Act and the Gramm-Leach-Bliley Act. Correctly implementing faxing into your organization to provide secure, real-ti…
Describes a method of obtaining an object variable to an already running instance of Microsoft Access so that it can be controlled via automation.
In Microsoft Access, learn how to use Dlookup and other domain aggregate functions and one method of specifying a string value within a string. Specify the first argument, which is the expression to be returned: Specify the second argument, which …
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…

911 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

Need Help in Real-Time?

Connect with top rated Experts

24 Experts available now in Live!

Get 1:1 Help Now