Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsGeneralPHPASPPerlColdFusionFlashHTML, CSS, ScriptsBrowsers

Webmaster Forum / ASP / Database Access / September 2003



Tip: Looking for answers? Try searching our database.

OLEDB and an Access Db with a password

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Laphan - 26 Sep 2003 20:17 GMT
Hi All

ISP has told me that I should be using OLEDB connections instead of ODBC to
get better ASP > ADO > Access DB performance.

After a visit to ConnectionStrings.com this OLEDB seemed straightforward
enough with a DB with no password and then I tried it with DB that has a
password ... what the hell is this all about??

'Can't load application.  Workgroup File something or other or user has
exclusive access..'  What??  All I've done is add a password to the
Connection string's Password param.

My Connection string with password is as follows:

strDSN="Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" &
Server.Mappath("db/mydb.mdb") & ";User Id=admin;Password=fred;"

The strDSN is variable that I use as follows:

set oConn=Server.CreateObject("ADODB.Connection")
oConn.open strDSN

Brinkster support came up with a beauty in that if I want to use passwords
then I go back to the defunct ODBC  method.

Could somebody please tell me how I sort this out so that I can
password-protect my DB.

Thanks

Laphan
Bob Barrows - 26 Sep 2003 22:01 GMT
>-----Original Message-----
>Hi All
[quoted text clipped - 14 lines]
>strDSN="Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" &
>Server.Mappath("db/mydb.mdb") & ";User Id=admin;Password=fred;"

That's not the correct connection string. Look at
connectionstrings.com again. You've provided a username
and password as if the database was using workgroup
security. You really need to do some reading about Access
security so you'll know the difference between workgroup
security and a password-secured database. Try this:
http://student.muskegon.cc.mi.us/~carlsonr/Secfaq.exe

Anyways, this is what your connection string should look
like:
With password:
"Provider=Microsoft.Jet.OLEDB.4.0;Data
Source=\somepath\mydb.mdb;Jet OLEDB:Database
Password=MyDbPassword;","admin", ""

HTH,
Bob Barrows
Laphan - 28 Sep 2003 19:43 GMT
Many thanks Bob

Rgds

Laphan

>-----Original Message-----
>Hi All
>
>ISP has told me that I should be using OLEDB connections
instead of ODBC to
>get better ASP > ADO > Access DB performance.
>
>After a visit to ConnectionStrings.com this OLEDB seemed
straightforward
>enough with a DB with no password and then I tried it
with DB that has a
>password ... what the hell is this all about??
>
>'Can't load application.  Workgroup File something or
other or user has
>exclusive access..'  What??  All I've done is add a
password to the
>Connection string's Password param.
>
>My Connection string with password is as follows:
>
>strDSN="Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" &
>Server.Mappath("db/mydb.mdb") & ";User
Id=admin;Password=fred;"

That's not the correct connection string. Look at
connectionstrings.com again. You've provided a username
and password as if the database was using workgroup
security. You really need to do some reading about Access
security so you'll know the difference between workgroup
security and a password-secured database. Try this:
http://student.muskegon.cc.mi.us/~carlsonr/Secfaq.exe

Anyways, this is what your connection string should look
like:
With password:
"Provider=Microsoft.Jet.OLEDB.4.0;Data
Source=\somepath\mydb.mdb;Jet OLEDB:Database
Password=MyDbPassword;","admin", ""

HTH,
Bob Barrows
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.