Password for the ACCESS database of the website

Source: Internet
Author: User

I don't need to talk about the importance of the website database. The account and password of the website administrator are stored in it. There are many ways to protect the database from being downloaded. Below we recommend several methods to prevent the database from being Down, users who buy a virtual space can lengthen the name of the database and modify the suffix. If you have server permissions, you can set URL redirection for the database to prevent mdb files from being downloaded. Today, we will introduce you to the Database Password adding method. Even if the database is downloaded, it cannot be opened without a password.
First, open Microsoft Access and select Open in exclusive mode. Then, choose tools> Security> set database password from the menu. In this way, you can. No matter who opens the encrypted database in the future, the system will prompt you to enter the password.
How can asp access a database with a password? You only need to add a piece of code to the configuration file conn. asp. Here we will use the mobile and easy website content management system that webmasters are familiar with to demonstrate how to modify the mobile and easy root directory conn. the database connection code in asp. We set ConnStr = "Provider = Microsoft. jet. OLEDB.4.0; Data Source = "& Server. mapPath (db) is changed to ConnStr = "Provider = Microsoft. jet. OLEDB.4.0; Data Source = "& Server. mapPath (db) & "; User ID = admin; Password =; Jet OLEDB: Database Password = 123456", where 123456 is the Password you just set.
If the website is non-dynamic and easy to use, you can make corresponding changes according to the code below the corresponding configuration file.
<%
Connstr = "DBQ =" + server. mappath ("Server. mdb ") +"; DefaultDir =; DRIVER = {Microsoft Access Driver (*. mdb)}; pwd = 123456 ;"
Set conn = server. createobject ("ADODB. CONNECTION ")
Conn. open connstr
%>

Related Article

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.