VS2005 using Access 2000 database with database password

D

Dave Flowers

Hi all,

I hope I'm in the right place. I have an existing Access database that has a
Jet OLEDB:Database Password and I'm having trouble connecting to it with
2005 ASP.NET. If I clear the password I don't have a problem but this is not
an option when this app goes into production. I've tried and tried to set
the password using the add connection wizard but it just doesn't work. I'm
asked for the password every time I try to view the app in IE or drag a
table to a page.

I'm running VS2005 on XP SP2 with SQL 2005, MDAC 2.8, Jet 4 SP8 and Office
Pro 2003.

Does anybody know how I can set this up?

Thanks
 
A

Aytaç ÖZAY

Hi,

I advise you not to use wizards. You can set your connection string
"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=\somepath\mydb.mdb;Jet
OLEDB:Database Password=MyDbPassword;"
like that. Perhaps your wizard missed the password.

Have a nice work,

Aytaç ÖZAY
Software Developer
 
P

Paul Clement

¤ Hi all,
¤
¤ I hope I'm in the right place. I have an existing Access database that has a
¤ Jet OLEDB:Database Password and I'm having trouble connecting to it with
¤ 2005 ASP.NET. If I clear the password I don't have a problem but this is not
¤ an option when this app goes into production. I've tried and tried to set
¤ the password using the add connection wizard but it just doesn't work. I'm
¤ asked for the password every time I try to view the app in IE or drag a
¤ table to a page.
¤
¤ I'm running VS2005 on XP SP2 with SQL 2005, MDAC 2.8, Jet 4 SP8 and Office
¤ Pro 2003.
¤
¤ Does anybody know how I can set this up?

This sounds a little confusing to me. Did you test the connection in the Add Connection Wizard
before adding it to your project?


Paul
~~~~
Microsoft MVP (Visual Basic)
 
D

Dave Flowers

Yep I did, and it works fine. It just doesn't save the database password in
the connection string. And the connection string isn't saved in web.config
so I don't know if there a way to edit the string created by the wizard. I'm
trying to use the new provider class built into the 2.0 framework. I've used
the "Provider=Microsoft.Jet.OLEDB.4.0" connection string for years without
any trouble and I can just go back to that if all else fails.

Dave
 
P

Paul Clement

¤ Yep I did, and it works fine. It just doesn't save the database password in
¤ the connection string. And the connection string isn't saved in web.config
¤ so I don't know if there a way to edit the string created by the wizard. I'm
¤ trying to use the new provider class built into the 2.0 framework. I've used
¤ the "Provider=Microsoft.Jet.OLEDB.4.0" connection string for years without
¤ any trouble and I can just go back to that if all else fails.
¤

There is an option in the Data Source Configuration Wizard that displays after you have created the
connection. Select "Yes, include sensitive data in the connection string."

Once you select this option the Jet OLEDB:Database Password information should appear in the
connection string.


Paul
~~~~
Microsoft MVP (Visual Basic)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top