WEB开发网      濠靛倻鏅悵顖涚附閽樺鐎诲ù婊庡亾缁辨帗鎷呴悩鍨暠濞戞挴鍋撳ù鐘烘閸ㄥ孩绂嶉锝喰﹂柟瀛樺灣濠婃垿鎯冮崟顏嗩伇濞寸姾妫勬慨鈺呭礉濞戝磭骞㈤悹鍥у槻閸ㄥ孩绂嶉敓锟� ---闁挎洩鎷�
开发学院WEB开发ASP 加密你的Access数据库 阅读

加密你的Access数据库

 2001-03-31 10:17:50 来源:WEB开发网 闁靛棴鎷�闁告垵绻愰惃顒傗偓娑欍仦缂嶏拷濠⒀呭仜閵囧洨鈧稒銇炵紞锟�闁靛棴鎷�  闁稿繗娅曢弫鐐次涘▎鎰泚闁告娲ㄥ▓鎴濐嚗椤旂厧瑙�
核心提示:Secure Your access DatabaseHow can you keep unwanted people from downloading your database simply by typing in the url? You can't, it is not possible. BUT y
Secure Your access Database

  How can you keep unwanted people from downloading your database simply by typing in the url?

You can't, it is not possible. BUT you can secure it by adding a passWord to it. Below I will

walk you through the steps needed to accomplish this.

1. Download your database (new feature added today, see above).

2. Open it up in MS Access. (Check the "Exclusive" checkbox in the file dialog box. If you don't,

Access will ask you to later.)

3. Menu Bar --> Tools --> Security --> Set Database Password Select "Tools" from the menu bar,

then "Security", then "Set Database Password."

4. Your password can be: (quoted from MS Access Help) "Passwords can be any combination of 14 or

fewer characters, except control characters. Passwords are case-sensitive."

5. Upload your password PRotected database to Brinkster.

6. What needs to be changed in your code:
Only your connection string needs to be changed. Here is a sample:

Set Conn = Server.CreateObject("ADODB.Connection")
MyConnStr = "DRIVER={Microsoft Access Driver (*.mdb)}; "
MyConnStr = MyConnStr & "DBQ=d:\sites\membername\db\mydbase.mdb; "
MyConnStr = MyConnStr & "PWD=yourpassword"
Conn.Open(MyConnStr)

Add the "PWD=yourpassword" to the connection string and you are set!

7. In the SQL Mgr, a new field has been added for password. This way you can still use the SQL

Mgr, even if your Access database has been password protected!

By: Jared Stauffer


Tags:加密 Access 数据库

编辑录入:爽爽 [复制链接] [打 印]
赞助商链接