Forum Moderators: open

Message Too Old, No Replies

ASP access database protection

         

adwordstudent

4:26 pm on Jul 25, 2004 (gmt 0)

10+ Year Member



I write a ASP member area script. I use access database(ADO connetion). I want add password to protect the database.
I try to use Access password protection. But I don't know how to write a ASP script to conntect to password.

Thank you for your support

Best Regard
William

macrost

11:01 pm on Jul 26, 2004 (gmt 0)

10+ Year Member



adwordstudent,
What you will need to do is this:
In your access db, create a table that will hold just usernames and passwords.

In your login script you will have to query that table that contains usernames and passwords. If username and password both match then let them in, else don't.

adwordstudent

4:46 pm on Jul 27, 2004 (gmt 0)

10+ Year Member



Thank you for your comment.

But can I use Access Password function? And I nedd add connect string such as password="****" to it.

Such as 'connmajors.Open "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=\\server\accessdb.mdb; Pwd=***;"

But it doesn't work.

Best Regard
William

mattglet

6:11 pm on Jul 27, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Access' password function is only meant for client use, not web use. You can password protect your whole database file, so you can't open it. It doesn't work that way over the web. You need to do what macrost suggested, and set up username/password restrictions on the parts of the site you wish to display the data located in the database.

dataguy

12:13 pm on Jul 28, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I don't think adwordstudent is asking how to password protect his web pages. According to his title he's asking how to protect his database, so storing passwords in a table and using a login script to query the table wouldn't do what he's asking for.

He should set the password for the database in Access itself, and then use the password in the connection string like this:

ConString = "PROVIDER=MICROSOFT.JET.OLEDB.4.0;DATA SOURCE\\server\accessdb.mdb; JET OLEDB:Database Password=pwdhere"

adwordstudent

4:40 pm on Jul 29, 2004 (gmt 0)

10+ Year Member



Thank you everybody to support me.

Best Regard

raptorix

2:15 pm on Aug 1, 2004 (gmt 0)

10+ Year Member



Access database protection is very weak, on the net there are tools that easely extract them. The most essential part is that you place the Database OUTSIDE the database root, so people can not download it.