Detailed description of the Access database management password method

Source: Internet
Author: User
Enterprise Software hotspot articles the easiest way to back up MySQL database some methods how to save memory efficiency in Java programming high in Access database, embedded into a strong database operating language-Visual Basic language, therefore, you can use Visual Basic to write programs to implement some complex functions. The following describes how to implement

Enterprise Software hotspot articles the easiest way to back up MySQL database some methods how to save memory efficiency in Java programming high in Access database, embedded into a strong database operating language-Visual Basic language, therefore, you can use Visual Basic to write programs to implement some complex functions. The following describes how to implement

 Enterprise Software hotspot articles
The easiest way to back up a MySQL database How to save high memory efficiency during Java programming

In the Access database, a strong database operation language-Visual Basic language is embedded. Therefore, you can use Visual Basic to write programs to implement some complex functions. The following describes how to implement encryption in the Visual BASIC program to ensure data security. We can also see that the Access database manages passwords.

For some companies, employee salary management is not a big problem. Sometimes, leaders need to know the income of each employee over a period of time in order to grasp the distribution of various bonuses. To this end, I have designed a "Wage Management" database, which can be queried by time and calculated based on the selected wage category. To prevent others from viewing this database, I used the "exclusive" method to set a password for the database. This method also has some limitations. If the user happens to provide the correct Database Password, this method cannot control the user's operations on the database.

In order to further prevent employees from viewing the salary statistics (that is, some bonuses are not public, and other people except leaders should not know the salary amount), I created a password table, set the password and remember to hide it. (select "password table" and click "hide" in the "window" menu to hide the table ). Then, in the "employee salary" dialog box, add the "password" text box, and add the following statements during the "preview" and "print" Events:

DoCmd. ApplyFilter, "Password = Forms!

Employee Salary dialog box! PassText"

If Not IsNull ([Password]) Then

/* Other code */

Else

MsgBox "enter the correct password! "

PassText. SetFocus

End If

/* Other code */

In this way, the dual encryption function is implemented. Even if the user can access the database and does not provide the correct password for the second time, he cannot preview and print the statistical results within a certain period of time. This further limits the user's unauthorized access.

To improve database security, you should change the password at intervals. To this end, in the "Employee Salary dialog box" form, I added a "Change Password" subform, in which the following code can be added to change the password at any time

Private Sub confirm _ Click ()

On Error GoTo Err _ OK _ Click

DoCmd. ApplyFilter, "Password

= Forms! Change Password! Text1"

If IsNull ([Password]) Then

MsgBox ("the password is incorrect,

Enter ")

Text1.SetFocus

GoTo Exit _ _ Click:

End If

If Text3.Value <> Text2.Value Then

Text3.SetFocus

MsgBox ("enter the correct password ")

Else:

Password = Text3.Value

DoCmd. Close

End If

Exit _ confirm _ Click:

Exit Sub

Err _ confirm _ Click:

MsgBox Err. Description

Resume Exit _ confirm _ Click

End Sub

After changing the password, remember this password for future use.

Design the program and hide the relevant code (same as hiding the "table") to prevent others from modifying or peeking. The method described here is only a small trick to implement the encryption function in the program. In other database management, this method can also be used for encryption. There may be more concise methods to be explored and communicated during the programming process.

There may be many articles about the security of the Access database. The methods mentioned above are also effective, which can ensure the security of the Access database and hope to help you.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.