Wrox Home  
Search P2P Archive for: Go

  Return to Index  

asp_databases thread: Data source name not found


Message #1 by "Gary Marcos" <gary_marcos@y...> on Fri, 24 Aug 2001 09:55:20
Trying example in chapter 2, and receiving following error message.  I 

believe everything on my system is setup ok and configured as specified.  

I am running on Windows 2000 Advanced Server.





HTTP 500.100 - Internal Server Error - ASP error

Internet Information Services



---------------------------------------------------------------------------

-----



Technical Information (for support personnel)



Error Type:

Microsoft OLE DB Provider for ODBC Drivers (0x80004005)

[Microsoft][ODBC Driver Manager] Data source name not found and no default 

driver specified

/testsailor.asp, line 19





The code for this is:

<%@Language=VBScript%>

<html>

<head>

<title>Home Page</title>

</head>

<body>

<p>This line from HTML</p>

<hr>

<p>Next line from ASP will work<br>

if ASP extensions installed correctly:<br>

<%

  response.write "<b>From ASP</b>"

%>

<hr>

<p>Next line from ADO will work if a DSN named sailors has been set<br>

for the database which is named SAILORS.MDB.</p>

<%

  set oRS=server.createobject("ADODB.recordset")

  oRS.open "Select * from People", "DSN=sailors"

  oRS.movefirst

  response.write "<b>" & oRS("PeopleNameLast") & "</b>"

%>

<hr>

Finished test page</p>

</body>

</html>





In the odbc data source administrator I can see the 'sailors' user dsn 

assigned to a ms access db so it looks ok.



Lastly, a separate problem is that I cannot get a testpage ASP script to 

run in FrontPage 2000, but it runs fine if I use a browser to look at it.  

Ideas?



Thanks,

Gary





Message #2 by gbrown@c... on Fri, 24 Aug 2001 12:24:53
Hi



Recommend you try OLEDB instead of DSNs. I started with them and they gave 

nothing but trouble. OLEDB is a lot easier and works all the time.



Off track but hope that helps



Regards

Graham



> Trying example in chapter 2, and receiving following error message.  I 

> believe everything on my system is setup ok and configured as 

specified.  

> I am running on Windows 2000 Advanced Server.

> 

> 

> HTTP 500.100 - Internal Server Error - ASP error

> Internet Information Services

> 

> -------------------------------------------------------------------------

--

> -----

> 

> Technical Information (for support personnel)

> 

> Error Type:

> Microsoft OLE DB Provider for ODBC Drivers (0x80004005)

> [Microsoft][ODBC Driver Manager] Data source name not found and no 

default 

> driver specified

> /testsailor.asp, line 19

> 

> 

> The code for this is:

> <%@Language=VBScript%>

> <html>

> <head>

> <title>Home Page</title>

> </head>

> <body>

> <p>This line from HTML</p>

> <hr>

> <p>Next line from ASP will work<br>

> if ASP extensions installed correctly:<br>

> <%

>   response.write "<b>From ASP</b>"

> %>

> <hr>

> <p>Next line from ADO will work if a DSN named sailors has been set<br>

> for the database which is named SAILORS.MDB.</p>

> <%

>   set oRS=server.createobject("ADODB.recordset")

>   oRS.open "Select * from People", "DSN=sailors"

>   oRS.movefirst

>   response.write "<b>" & oRS("PeopleNameLast") & "</b>"

> %>

> <hr>

> Finished test page</p>

> </body>

> </html>

> 

> 

> In the odbc data source administrator I can see the 'sailors' user dsn 

> assigned to a ms access db so it looks ok.

> 

> Lastly, a separate problem is that I cannot get a testpage ASP script to 

> run in FrontPage 2000, but it runs fine if I use a browser to look at 

it.  

> Ideas?

> 

> Thanks,

> Gary

> 

> 

Message #3 by "Gary Marcos" <gary_marcos@y...> on Sat, 25 Aug 2001 01:06:20
Turns out that I should have set the DSN as a system dsn.  I had 

accidently set it as a user dsn.  Once I made the change it worked fine.

thanks,

Gary

  Return to Index