Print Page | Close Window

Question about protecting access db, ASP

Printed From: Web Wiz Forums
Category: General Discussion
Forum Name: Database Discussion
Forum Description: Discussion and chat on database related topics.
URL: https://forums.webwiz.net/forum_posts.asp?TID=4454
Printed Date: 30 March 2026 at 3:55am
Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com


Topic: Question about protecting access db, ASP
Posted By: dannyboy111
Subject: Question about protecting access db, ASP
Date Posted: 23 July 2003 at 4:09am

I would like to protect my ACCESS database with a password. How do I configure it in access and what I must add in my ASP file?

 

that is my code for connection:

Set MyConn = Server.CreateObject("ADODB.Connection")
openStr = "driver={Microsoft Access Driver (*.mdb)};" & _
"dbq=" & Server.MapPath("\db.mdb")
MyConn.Open openStr,"",""

 

Thank you

 




Replies:
Posted By: Boecky
Date Posted: 23 July 2003 at 1:35pm

oConn.Open "Driver={Microsoft Access Driver (*.mdb)};" & _
           "Dbq=c:\somepath\mydb.mdb;" & _
           "Uid=admin;" & _
           "Pwd="

Take a look here:
http://www.able-consulting.com/ado_conn.htm?f=ado_conn.htm - http://www.able-consulting.com/ado_conn.htm?f=ado_conn.htm



Posted By: dannyboy111
Date Posted: 23 July 2003 at 1:44pm

Thanks for your reply.

There are different kinds of driver configuration, so could you please add those things with the password the way they are suppose to be to my code? I tried myself and keep getting a error msg.

Thank you.



Posted By: Boecky
Date Posted: 25 July 2003 at 3:53am

Set MyConn = Server.CreateObject("ADODB.Connection")
openStr = "driver={Microsoft Access Driver (*.mdb)};" & _
"dbq=" & Server.MapPath("\db.mdb") & _
"Uid=yourlogin;" &_
"Pwd=yourpassword"
MyConn.Open openStr,"",""



Posted By: dannyboy111
Date Posted: 25 July 2003 at 12:15pm

Thanks!

How do I configure it in Access? I configured a password in the security options, but shall I configure also a username? where how?

 



Posted By: rcalvert
Date Posted: 05 August 2003 at 5:42pm

Admin is the default password if not set user and group permissions.



Posted By: zMaestro
Date Posted: 06 August 2003 at 6:40am

there are many programs that can open the "Password Protected Office Files", I used one and opened a password protected .mdb file in seconds...

 

it is better to protect it on the server, I suggest renaming the .mdb file to .asp file, it will function normally, but would never be downloadable through a web browser.




Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.08 - https://www.webwizforums.com
Copyright ©2001-2026 Web Wiz Ltd. - https://www.webwiz.net