欢迎来到福编程网,本站提供各种互联网专业知识!
您的位置:网站首页 > 数据库 > Access

加密你的Access数据库asp打开方法

发布时间:2007-07-31 作者: 来源:转载
SecureYourAccessDatabaseHowcanyoukeepunwantedpeoplefromdownloadingyourdatabasesimplybytypingintheurl?Youcan't,itisnotpossible.BUTyoucansecureitbyaddingapasswordtoit.BelowIwillwalkyouthroughthestepsneededtoaccomplishthis.1.Downloadyourdatab
SecureYourAccessDatabase

Howcanyoukeepunwantedpeoplefromdownloadingyourdatabasesimplybytypingintheurl?

Youcan't,itisnotpossible.BUTyoucansecureitbyaddingapasswordtoit.BelowIwill

walkyouthroughthestepsneededtoaccomplishthis.

1.Downloadyourdatabase(newfeatureaddedtoday,seeabove).

2.OpenitupinMSAccess.(Checkthe"Exclusive"checkboxinthefiledialogbox.Ifyoudon't,

Accesswillaskyoutolater.)

3.MenuBar-->Tools-->Security-->SetDatabasePasswordSelect"Tools"fromthemenubar,

then"Security",then"SetDatabasePassword."

4.Yourpasswordcanbe:(quotedfromMSAccessHelp)"Passwordscanbeanycombinationof14or

fewercharacters,exceptcontrolcharacters.Passwordsarecase-sensitive."

5.UploadyourpasswordprotecteddatabasetoBrinkster.

6.Whatneedstobechangedinyourcode:
Onlyyourconnectionstringneedstobechanged.Hereisasample:

SetConn=Server.CreateObject("ADODB.Connection")
MyConnStr="DRIVER={MicrosoftAccessDriver(*.mdb)};"
MyConnStr=MyConnStr&"DBQ=d:sitesmembernamedbmydbase.mdb;"
MyConnStr=MyConnStr&"PWD=yourpassword"
Conn.Open(MyConnStr)

Addthe"PWD=yourpassword"totheconnectionstringandyouareset!

7.IntheSQLMgr,anewfieldhasbeenaddedforpassword.ThiswayyoucanstillusetheSQL

Mgr,evenifyourAccessdatabasehasbeenpasswordprotected!

By:JaredStauffer

相关推荐