DSNLess connection

DSNLess connection

am 22.05.2005 15:53:58 von Laura

Not sure if this is the right place to ask..

I have a computer with Windows 98 on which I have set it up as a Personal
Web Server and I am running/testing a small Access database. I am working
from my XP computer in the same room, connected by network cable.

I am confused as to which connection I should be using. I have to admit, one
works (A), but I've been advised that I really should be using the other
(B).

A) This works.

DSNNAME = "Driver={Microsoft Access Driver (*.mdb)};uid=;pwd=letmein; DBQ="
& Server.MapPath("\databases\users.mdb")

B) This does not work and this is what I believe I should be using:-

DSNNAME = "Provider=Microsoft.Jet.OLEDB.4.0; User ID=;Password=letmein; Data
Source=" & server.mappath("\databases\users.mdb") & ";"

This is the error message I get with Option (B):-

Microsoft JET Database Engine error '80040e4d'
Cannot start your application. The workgroup information file is missing or
opened exclusively by another user.
/check_user.asp, line 42


Could it be that the password is not working? It does work in Option (A),
but not in Option (B). The database has been password protected with
password "letmein". What am I doing wrong?

thanks
Laura TD

Re: DSNLess connection

am 22.05.2005 16:03:09 von Steven Burn

Firstly, DO NOT stick the database in reach of the outside world (stick =
it above the web root).

As for the connection, give this a try;

objDB =3D "\database\users.mdb"
DSNName =3D "PROVIDER=3DMicrosoft.Jet.OLEDB.4.0;DATA SOURCE=3D" + =
Server.MapPath(objDB) + ";Jet OLEDB:Database Password=3Dletmein;"

--=20
Regards

Steven Burn
Ur I.T. Mate Group
www.it-mate.co.uk

Keeping it FREE!

"laura" wrote in message =
news:eiT45WtXFHA.2420@TK2MSFTNGP12.phx.gbl...
> Not sure if this is the right place to ask..
>=20
> I have a computer with Windows 98 on which I have set it up as a =
Personal
> Web Server and I am running/testing a small Access database. I am =
working
> from my XP computer in the same room, connected by network cable.
>=20
> I am confused as to which connection I should be using. I have to =
admit, one
> works (A), but I've been advised that I really should be using the =
other
> (B).
>=20
> A) This works.
>=20
> DSNNAME =3D "Driver=3D{Microsoft Access Driver =
(*.mdb)};uid=3D;pwd=3Dletmein; DBQ=3D"
> & Server.MapPath("\databases\users.mdb")
>=20
> B) This does not work and this is what I believe I should be using:-
>=20
> DSNNAME =3D "Provider=3DMicrosoft.Jet.OLEDB.4.0; User =
ID=3D;Password=3Dletmein; Data
> Source=3D" & server.mappath("\databases\users.mdb") & ";"
>=20
> This is the error message I get with Option (B):-
>=20
> Microsoft JET Database Engine error '80040e4d'
> Cannot start your application. The workgroup information file is =
missing or
> opened exclusively by another user.
> /check_user.asp, line 42
>=20
>=20
> Could it be that the password is not working? It does work in Option =
(A),=20
> but not in Option (B). The database has been password protected with=20
> password "letmein". What am I doing wrong?
>=20
> thanks
> Laura TD=20
>=20
>=20

Re: DSNLess connection

am 22.05.2005 16:16:04 von reb01501

laura wrote:
>
> DSNNAME = "Provider=Microsoft.Jet.OLEDB.4.0; User
> ID=;Password=letmein; Data Source=" &
> server.mappath("\databases\users.mdb") & ";"
> This is the error message I get with Option (B):-
>
> Microsoft JET Database Engine error '80040e4d'
> Cannot start your application. The workgroup information file is
> missing or opened exclusively by another user.
> /check_user.asp, line 42
>
>
> Could it be that the password is not working? It does work in Option
> (A), but not in Option (B). The database has been password protected
> with password "letmein". What am I doing wrong?


Since your database is not using workgroup security, you should not be using
a user name and password. It looks as if your database is password-secured
(which is futile security at best). If so, your connection string should
look like this (from www.carlprothman.net):

DSNNAME = "Provider=Microsoft.Jet.OLEDB.4.0; Jet OLEDB:Database
Password=letmein; Data
Source=" & server.mappath("\databases\users.mdb") & ";"


HTH,
Bob Barrows
--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"

Re: DSNLess connection

am 22.05.2005 18:13:46 von Laura

Hello Bob,

Many thanks - your "string" worked. From what I could see, the only
difference was removing

user id=; and addding "Jet.OLEDB:Database" before "password=letmein".

No, I'm not working in a workgroup, the database is to go on an intranet and
it's going to be used in a section of the intranet where only some specific
people will be allowed in to amend some of the databases - hence users.mdb
which will contain usernames, passwords of those who are allowed in those
sections.

I understand that the database should not be an an area accessible to the
entire staff. This is just to verify those able to access other areas. I
hope it's going to work - I'm learning as I go along.

Thank you so much
Laura TD


"Bob Barrows [MVP]" wrote in message
news:eOjiHjtXFHA.3184@TK2MSFTNGP15.phx.gbl...
> laura wrote:
>>
>> DSNNAME = "Provider=Microsoft.Jet.OLEDB.4.0; User
>> ID=;Password=letmein; Data Source=" &
>> server.mappath("\databases\users.mdb") & ";"
>> This is the error message I get with Option (B):-
>>
>> Microsoft JET Database Engine error '80040e4d'
>> Cannot start your application. The workgroup information file is
>> missing or opened exclusively by another user.
>> /check_user.asp, line 42
>>
>>
>> Could it be that the password is not working? It does work in Option
>> (A), but not in Option (B). The database has been password protected
>> with password "letmein". What am I doing wrong?
>
>
> Since your database is not using workgroup security, you should not be
> using a user name and password. It looks as if your database is
> password-secured (which is futile security at best). If so, your
> connection string should look like this (from www.carlprothman.net):
>
> DSNNAME = "Provider=Microsoft.Jet.OLEDB.4.0; Jet OLEDB:Database
> Password=letmein; Data
> Source=" & server.mappath("\databases\users.mdb") & ";"
>
>
> HTH,
> Bob Barrows
> --
> Microsoft MVP - ASP/ASP.NET
> Please reply to the newsgroup. This email account is my spam trap so I
> don't check it very often. If you must reply off-line, then remove the
> "NO SPAM"
>

Re: DSNLess connection

am 22.05.2005 18:20:16 von Laura

Hello Steven,

Thanks for your reply. There was another from Bob Barrows also which cleared
my "string" up so that it would work - as it turns out, it looks as if I
needed to add "Jet OLEDB:Database " before the word "Password".

This database will be on an intranet, not visible to the outside world, and
I will ensure it is an area not accessible by all the staff. It's going to
hold usernames and passwords for those members of staff allowed to access
certain areas of the intranet. Not sure if it's the best method, but so far
it's the only method I've worked out.

Many thanks for pointing that out to me and for your assistance.

Regards,
Laura TD


"Steven Burn" wrote in message
news:eA5zactXFHA.2124@TK2MSFTNGP14.phx.gbl...
Firstly, DO NOT stick the database in reach of the outside world (stick it
above the web root).

As for the connection, give this a try;

objDB = "\database\users.mdb"
DSNName = "PROVIDER=Microsoft.Jet.OLEDB.4.0;DATA SOURCE=" +
Server.MapPath(objDB) + ";Jet OLEDB:Database Password=letmein;"

--
Regards

Steven Burn
Ur I.T. Mate Group
www.it-mate.co.uk

Keeping it FREE!

"laura" wrote in message
news:eiT45WtXFHA.2420@TK2MSFTNGP12.phx.gbl...
> Not sure if this is the right place to ask..
>
> I have a computer with Windows 98 on which I have set it up as a Personal
> Web Server and I am running/testing a small Access database. I am working
> from my XP computer in the same room, connected by network cable.
>
> I am confused as to which connection I should be using. I have to admit,
> one
> works (A), but I've been advised that I really should be using the other
> (B).
>
> A) This works.
>
> DSNNAME = "Driver={Microsoft Access Driver (*.mdb)};uid=;pwd=letmein;
> DBQ="
> & Server.MapPath("\databases\users.mdb")
>
> B) This does not work and this is what I believe I should be using:-
>
> DSNNAME = "Provider=Microsoft.Jet.OLEDB.4.0; User ID=;Password=letmein;
> Data
> Source=" & server.mappath("\databases\users.mdb") & ";"
>
> This is the error message I get with Option (B):-
>
> Microsoft JET Database Engine error '80040e4d'
> Cannot start your application. The workgroup information file is missing
> or
> opened exclusively by another user.
> /check_user.asp, line 42
>
>
> Could it be that the password is not working? It does work in Option (A),
> but not in Option (B). The database has been password protected with
> password "letmein". What am I doing wrong?
>
> thanks
> Laura TD
>
>

Re: DSNLess connection

am 22.05.2005 18:27:02 von Steven Burn

No problem ;o)

--=20
Regards

Steven Burn
Ur I.T. Mate Group
www.it-mate.co.uk

Keeping it FREE!

"laura" wrote in message =
news:eIUToouXFHA.3864@TK2MSFTNGP10.phx.gbl...
> Hello Steven,
>=20
> Thanks for your reply. There was another from Bob Barrows also which =
cleared=20
> my "string" up so that it would work - as it turns out, it looks as if =
I=20
> needed to add "Jet OLEDB:Database " before the word "Password".
>=20
> This database will be on an intranet, not visible to the outside =
world, and=20
> I will ensure it is an area not accessible by all the staff. It's =
going to=20
> hold usernames and passwords for those members of staff allowed to =
access=20
> certain areas of the intranet. Not sure if it's the best method, but =
so far=20
> it's the only method I've worked out.
>=20
> Many thanks for pointing that out to me and for your assistance.
>=20
> Regards,
> Laura TD
>=20
>=20
> "Steven Burn" wrote in message=20
> news:eA5zactXFHA.2124@TK2MSFTNGP14.phx.gbl...
> Firstly, DO NOT stick the database in reach of the outside world =
(stick it=20
> above the web root).
>=20
> As for the connection, give this a try;
>=20
> objDB =3D "\database\users.mdb"
> DSNName =3D "PROVIDER=3DMicrosoft.Jet.OLEDB.4.0;DATA SOURCE=3D" +=20
> Server.MapPath(objDB) + ";Jet OLEDB:Database Password=3Dletmein;"
>=20
> --=20
> Regards
>=20
> Steven Burn
> Ur I.T. Mate Group
> www.it-mate.co.uk
>=20
> Keeping it FREE!
>=20
> "laura" wrote in message=20
> news:eiT45WtXFHA.2420@TK2MSFTNGP12.phx.gbl...
> > Not sure if this is the right place to ask..
> >
> > I have a computer with Windows 98 on which I have set it up as a =
Personal
> > Web Server and I am running/testing a small Access database. I am =
working
> > from my XP computer in the same room, connected by network cable.
> >
> > I am confused as to which connection I should be using. I have to =
admit,=20
> > one
> > works (A), but I've been advised that I really should be using the =
other
> > (B).
> >
> > A) This works.
> >
> > DSNNAME =3D "Driver=3D{Microsoft Access Driver =
(*.mdb)};uid=3D;pwd=3Dletmein;=20
> > DBQ=3D"
> > & Server.MapPath("\databases\users.mdb")
> >
> > B) This does not work and this is what I believe I should be using:-
> >
> > DSNNAME =3D "Provider=3DMicrosoft.Jet.OLEDB.4.0; User =
ID=3D;Password=3Dletmein;=20
> > Data
> > Source=3D" & server.mappath("\databases\users.mdb") & ";"
> >
> > This is the error message I get with Option (B):-
> >
> > Microsoft JET Database Engine error '80040e4d'
> > Cannot start your application. The workgroup information file is =
missing=20
> > or
> > opened exclusively by another user.
> > /check_user.asp, line 42
> >
> >
> > Could it be that the password is not working? It does work in Option =
(A),
> > but not in Option (B). The database has been password protected with
> > password "letmein". What am I doing wrong?
> >
> > thanks
> > Laura TD
> >
> >
>=20
>=20