Access database to Web site last password

Source: Internet
Author: User

Intermediary transaction http://www.aliyun.com/zixun/aggregation/6858.html ">seo diagnose Taobao guest cloud host technology Hall

The importance of the

Web site database, I don't have to say much. Webmaster account and password are placed inside, to protect the database is not downloaded methods there are many kinds of methods to prevent the database down, the purchase of virtual space friends can add long Miscellaneous database name, modify the suffix name. Server permissions can be set to the database URL to turn, to prevent the MDB file is downloaded. And today we introduce the method of password to the database. Even though the database was downloaded, he couldn't open it without a password.
First we open Microsoft Access and choose to open it exclusively. Then click the Tools on the menu--security--to set the database password. That's it. Whoever opens the encrypted database will be prompted to enter the password.
How do I make an ASP normal access to a database with a password? Just add a piece of code to the configuration file conn.asp. Here take the webmaster are familiar with the dynamic Web site content management system to demonstrate, modify dynamic root directory conn.asp database connection code, we will connstr = "Provider=Microsoft.Jet.OLEDB.4.0;Data source=" & Server.MapPath (DB) modified 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 site is a non-dynamic system, you can make the corresponding changes according to the code of its configuration file.
        <%
connstr= "dbq=" +server.mappath ("Server.mdb") + ";D efaultdir=;D river={microsoft Access DRIVER (*.mdb)};p wd=123456; "
Set Conn=server.createobject ("ADODB. CONNECTION ")
Conn.Open connstr
%>

         Article source: Luoyang website Construction (http://www.wangluo379.cn/)

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.