当前位置: 首页 > 图文教程 > 网络编程 > ASP > 加密你的Access数据库

ASP
ASP动态生成的javascript表单验证代码
将身份证从15位升级为18位的函数
ASP自定义函数,仿VBA中域函数DLookup
6行代码实现无组件上传
用VS2003调试ASP的方法和体会
ASP中存储过程调用的两种方式及比较
升级到2003后访问数据库发生8007007f错误的解决
ACCESS转化成SQL2000需要注意的几个问题
让ASP程序运行于非Windows平台
一些不长见的ASP调用存储过程的技巧
网站图片扫描类
一条sql 语句搞定数据库分页
在ASP中取得服务器网卡的MAC地址、DNS地址等网络信息
ASP中轻松实现变量名-值变换
用Xml2OleDb将XML文件插入到数据库
购物车中数据的存放方式
ASP数据库编程SQL常用技巧
在ASP中利用ADO显示Excel文件内容的函数
ASP+SQL Server之图象数据处理
在 Access 中使用“存储过程”

ASP 中的 加密你的Access数据库


出处:互联网   整理: 软晨网(RuanChen.com)   发布: 2009-11-03   浏览: 36 ::
收藏到网摘: n/a

  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