By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,494 Members | 898 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,494 IT Pros & Developers. It's quick & easy.

Setting up MSDE 2000 Release A on Windows XP Professional

P: n/a
I recently downloaded and installed (hopefully correctly) MSDE 2000 Release
A. I previously, and still do, have the version of IIS that comes with XP
Professional installed on my computer. I wanted MSDE 2000 Release A so that
I could do database access using ASP from my websites, which are on my
computer. When I went to my first test website, I recieved the following
error:

Error Type:
Microsoft OLE DB Provider for ODBC Drivers (0x80004005)
[Microsoft][ODBC SQL Server Driver]Neither DSN nor SERVER keyword supplied
/testDB.asp, line 26

The ASP code that I used on my web to connect to the database (which is
currently just an empty text file) is the following:

Set conn=Server.CreateObject("ADODB.Connection")
Set rs=Server.CreateObject("ADODB.Recordset")

connectstring="Driver={SQL Server};" &_
"DBQ=" & Server.MapPath("testDB")

conn.Open connectstring

The error, obviously, is in the last line I have shown. Because I am
somewhat new to server setup, I am not sure what I need to do to make this
work. If anyone would be willing to help me, I would greatly appreciate it.
Thanks.
--
Nathan Sokalski
nj********@hotmail.com
Jul 19 '05 #1
Share this Question
Share on Google+
6 Replies


P: n/a
> connectstring="Driver={SQL Server};" &_
"DBQ=" & Server.MapPath("testDB")


You've mixed up SQL Server and Access connection strings. MSDE does not
have a file called "testDB" and even if it did, it would not live in the
same folder as your ASP page. See http://www.aspfaq.com/2126 for valid SQL
Server connection strings.

--
Aaron Bertrand
SQL Server MVP
http://www.aspfaq.com/
Jul 19 '05 #2

P: n/a
TJS

for connection strings you can look here:

http://www.connectionstrings.com/
================================
http://www.ASPkey.net/
A Resource Site for Web Developers
*Free OnLine web Tools
*Free development services
================================
"Nathan Sokalski" <nj********@hotmail.com> wrote in message
news:u1**************@TK2MSFTNGP11.phx.gbl...
I recently downloaded and installed (hopefully correctly) MSDE 2000 Release A. I previously, and still do, have the version of IIS that comes with XP
Professional installed on my computer. I wanted MSDE 2000 Release A so that I could do database access using ASP from my websites, which are on my
computer. When I went to my first test website, I recieved the following
error:

Error Type:
Microsoft OLE DB Provider for ODBC Drivers (0x80004005)
[Microsoft][ODBC SQL Server Driver]Neither DSN nor SERVER keyword supplied
/testDB.asp, line 26

The ASP code that I used on my web to connect to the database (which is
currently just an empty text file) is the following:

Set conn=Server.CreateObject("ADODB.Connection")
Set rs=Server.CreateObject("ADODB.Recordset")

connectstring="Driver={SQL Server};" &_
"DBQ=" & Server.MapPath("testDB")

conn.Open connectstring

The error, obviously, is in the last line I have shown. Because I am
somewhat new to server setup, I am not sure what I need to do to make this
work. If anyone would be willing to help me, I would greatly appreciate it. Thanks.
--
Nathan Sokalski
nj********@hotmail.com

Jul 19 '05 #3

P: n/a
I think I am getting closer to my goal, but I am not sure where to go next.
My current error that I recieve is:

Microsoft OLE DB Provider for ODBC Drivers (0x80040E4D)
[Microsoft][ODBC SQL Server Driver][SQL Server]Login failed for user
'NJS\IUSR_NJS'.
/testDB.asp, line 25

(line 25 in my code is conn.Open connectstring)
And my current code for opening the connection is:

Set conn=Server.CreateObject("ADODB.Connection")
Set rs=Server.CreateObject("ADODB.Recordset")

connectstring="Driver={SQL
Server};Server=NJS;Database=pubs;Trusted_Connectio n=yes;"

conn.Open connectstring

(NJS is the name of my computer, I figured that is what I was supposed to
put there)
I am not sure what I am supposed to do to fix this problem, since there are
no user or password fields/attributes in the connection string, as well as
the fact that there is an attribute called "Trusted_Connection" . I also do
not want the user (even though it will normally only be me, since I
primarily want this only for testing my websites) to have to enter a
username or password, so I do not really want there to be a login at all. If
anyone can help me, I would appreciate it. Thanks.
--
Nathan Sokalski
nj********@hotmail.com
"TJS" <no****@here.com> wrote in message
news:vt************@corp.supernews.com...

for connection strings you can look here:

http://www.connectionstrings.com/
================================
http://www.ASPkey.net/
A Resource Site for Web Developers
*Free OnLine web Tools
*Free development services
================================
"Nathan Sokalski" <nj********@hotmail.com> wrote in message
news:u1**************@TK2MSFTNGP11.phx.gbl...
I recently downloaded and installed (hopefully correctly) MSDE 2000

Release
A. I previously, and still do, have the version of IIS that comes with XP Professional installed on my computer. I wanted MSDE 2000 Release A so

that
I could do database access using ASP from my websites, which are on my
computer. When I went to my first test website, I recieved the following
error:

Error Type:
Microsoft OLE DB Provider for ODBC Drivers (0x80004005)
[Microsoft][ODBC SQL Server Driver]Neither DSN nor SERVER keyword supplied /testDB.asp, line 26

The ASP code that I used on my web to connect to the database (which is
currently just an empty text file) is the following:

Set conn=Server.CreateObject("ADODB.Connection")
Set rs=Server.CreateObject("ADODB.Recordset")

connectstring="Driver={SQL Server};" &_
"DBQ=" & Server.MapPath("testDB")

conn.Open connectstring

The error, obviously, is in the last line I have shown. Because I am
somewhat new to server setup, I am not sure what I need to do to make this work. If anyone would be willing to help me, I would greatly appreciate

it.
Thanks.
--
Nathan Sokalski
nj********@hotmail.com


Jul 19 '05 #4

P: n/a
As the error message tells you, you must grant IUSR_NJS logon rights to the
database.

--
Regards,
Kristofer Gafvert
Reply to newsgroup only. Remove NEWS if you must reply by email, but please
do not.
www.ilopia.com - FAQ and Tutorials for Windows Server 2003
"Nathan Sokalski" <nj********@hotmail.com> wrote in message
news:eI**************@TK2MSFTNGP09.phx.gbl...
I think I am getting closer to my goal, but I am not sure where to go next. My current error that I recieve is:

Microsoft OLE DB Provider for ODBC Drivers (0x80040E4D)
[Microsoft][ODBC SQL Server Driver][SQL Server]Login failed for user
'NJS\IUSR_NJS'.
/testDB.asp, line 25

(line 25 in my code is conn.Open connectstring)
And my current code for opening the connection is:

Set conn=Server.CreateObject("ADODB.Connection")
Set rs=Server.CreateObject("ADODB.Recordset")

connectstring="Driver={SQL
Server};Server=NJS;Database=pubs;Trusted_Connectio n=yes;"

conn.Open connectstring

(NJS is the name of my computer, I figured that is what I was supposed to
put there)
I am not sure what I am supposed to do to fix this problem, since there are no user or password fields/attributes in the connection string, as well as
the fact that there is an attribute called "Trusted_Connection" . I also do not want the user (even though it will normally only be me, since I
primarily want this only for testing my websites) to have to enter a
username or password, so I do not really want there to be a login at all. If anyone can help me, I would appreciate it. Thanks.
--
Nathan Sokalski
nj********@hotmail.com
"TJS" <no****@here.com> wrote in message
news:vt************@corp.supernews.com...

for connection strings you can look here:

http://www.connectionstrings.com/
================================
http://www.ASPkey.net/
A Resource Site for Web Developers
*Free OnLine web Tools
*Free development services
================================
"Nathan Sokalski" <nj********@hotmail.com> wrote in message
news:u1**************@TK2MSFTNGP11.phx.gbl...
I recently downloaded and installed (hopefully correctly) MSDE 2000

Release
A. I previously, and still do, have the version of IIS that comes with XP Professional installed on my computer. I wanted MSDE 2000 Release A so

that
I could do database access using ASP from my websites, which are on my
computer. When I went to my first test website, I recieved the following error:

Error Type:
Microsoft OLE DB Provider for ODBC Drivers (0x80004005)
[Microsoft][ODBC SQL Server Driver]Neither DSN nor SERVER keyword supplied /testDB.asp, line 26

The ASP code that I used on my web to connect to the database (which is currently just an empty text file) is the following:

Set conn=Server.CreateObject("ADODB.Connection")
Set rs=Server.CreateObject("ADODB.Recordset")

connectstring="Driver={SQL Server};" &_
"DBQ=" & Server.MapPath("testDB")

conn.Open connectstring

The error, obviously, is in the last line I have shown. Because I am
somewhat new to server setup, I am not sure what I need to do to make this work. If anyone would be willing to help me, I would greatly
appreciate it.
Thanks.
--
Nathan Sokalski
nj********@hotmail.com



Jul 19 '05 #5

P: n/a
Nathan Sokalski wrote:
I think I am getting closer to my goal, but I am not sure where to go
next. My current error that I recieve is:

Microsoft OLE DB Provider for ODBC Drivers (0x80040E4D)
[Microsoft][ODBC SQL Server Driver][SQL Server]Login failed for user
'NJS\IUSR_NJS'.
/testDB.asp, line 25

(line 25 in my code is conn.Open connectstring)
And my current code for opening the connection is:

Set conn=Server.CreateObject("ADODB.Connection")
Set rs=Server.CreateObject("ADODB.Recordset")

connectstring="Driver={SQL
Server};Server=NJS;Database=pubs;Trusted_Connectio n=yes;"

conn.Open connectstring

(NJS is the name of my computer, I figured that is what I was
supposed to put there)
I am not sure what I am supposed to do to fix this problem, since
there are no user or password fields/attributes in the connection
string, as well as the fact that there is an attribute called
"Trusted_Connection" . I also do not want the user (even though it
will normally only be me, since I primarily want this only for
testing my websites) to have to enter a username or password, so I do
not really want there to be a login at all. If anyone can help me, I
would appreciate it. Thanks.

How many times do we have to advise you not to use ODBC? Have you even
looked at the websites that have been cited?

The easiest way to connect to SQL Server is to use a SQL login. The user
does not have to see or know the login and password. You can supply those in
your connection string. So your first step is to use Enterprise Manager to
create a SQL login and password (say you use asp_acct/password) and grant
that account permissions to the database to which you are attempting to
connect. You should read up in SQL Books Online (BOL) all that is has to say
about SQL security.

Then, in ASP, do this:

connectstring = "Provider-SQLOLEDB;Data Source=NJS;" & _
"Initial Catalog=pubs;User ID=asp_acct;Password=password"

That's it. You're done.
--
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"
Jul 19 '05 #6

P: n/a
On Sun, 7 Dec 2003 02:59:52 -0500, "Nathan Sokalski"
<nj********@hotmail.com> wrote:
I think I am getting closer to my goal, but I am not sure where to go next.
Limiting to a single appropriate newsgroup would be the smartest move.
Followups reste to just the inetserver.asp.db group. use it.
My current error that I recieve is:

Microsoft OLE DB Provider for ODBC Drivers (0x80040E4D)
[Microsoft][ODBC SQL Server Driver][SQL Server]Login failed for user
'NJS\IUSR_NJS'.


And what part of "Login Failed" are you questioning?

Create a login for the IUSR_NJS user in your database. or better,
create a SQL user, with appropriate rights, and use an OLEDB provider
string with the account in the string. Use an Include to make this
easy.

Jeff
Jul 19 '05 #7

This discussion thread is closed

Replies have been disabled for this discussion.