Data source name not found

O

Otuatail

Can anyone help me with this database connection and an asp web page.
I am using Windows XP Professional with IIS added, Office 2000 and Visual
Studio 6 and using Internet Developer.
I have created a simple Access database and used ODBC in control pane. All I
have done is select a USER DSN and MS Access Database, and browsed to locate
it. No password has been created. I get the following error on line 6 which is
the "connection.Open dsn" line

----------------------------------
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
/default.asp, line 6
· Browser Type:
Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)
· Page:
GET /default.asp

----------- Here is the Short Code -----------------
<%@ Language=VBScript %>
<%
dsn = "SampleDB"
Set connection = Server.CreateObject("ADODB.Connection")
Set rsResults = Server.CreateObject("ADODB.Recordset")
connection.Open dsn

sqlResults = "SELECT * FROM Tables"
rsResults.Open sqlResults, connection, 1, 3
%>
<HTML>
<BODY>
<FORM>

<%if rsResults.eof = false then
while rsResults.eof = false%>

<%=rsResults("Name")%>
<br>
<%rsResults.MoveNext
wend
end if%>

</FORM>
</BODY>
</HTML>
 
W

William Tasso

Otuatail said:
Can anyone help me with this database connection and an asp web page.
I am using Windows XP Professional with IIS added, Office 2000 and
Visual Studio 6 and using Internet Developer.
I have created a simple Access database and used ODBC in control
pane. All I have done is select a USER DSN and MS Access Database,
and browsed to locate it. No password has been created. I get the
following error on line 6 which is the "connection.Open dsn" line

----------------------------------
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
/default.asp, line 6
...
Can anyone help this must be a simple error

Use ADO and dsnless connections instead of ODBC/DSNs
Ensure you have the correct path to the mdb.
 
G

Guest

Otuatail said:
Can anyone help me with this database connection and an asp web page.
I am using Windows XP Professional with IIS added, Office 2000 and Visual
Studio 6 and using Internet Developer.
I have created a simple Access database and used ODBC in control pane. All I
have done is select a USER DSN and MS Access Database, and browsed to locate
it. No password has been created. I get the following error on line 6 which is
the "connection.Open dsn" line

----------------------------------
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
/default.asp, line 6
· Browser Type:
Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)
· Page:
GET /default.asp

----------- Here is the Short Code -----------------
<%@ Language=VBScript %>
<%
dsn = "SampleDB"
Set connection = Server.CreateObject("ADODB.Connection")
Set rsResults = Server.CreateObject("ADODB.Recordset")
connection.Open dsn

sqlResults = "SELECT * FROM Tables"
rsResults.Open sqlResults, connection, 1, 3
%>
<HTML>
<BODY>
<FORM>

<%if rsResults.eof = false then
while rsResults.eof = false%>

<%=rsResults("Name")%>
<br>
<%rsResults.MoveNext
wend
end if%>

</FORM>
</BODY>
</HTML>

--------------------------------
Can anyone help this must be a simple error
TIA

Paul.

I haven't played around with the Microsoft web servers in a long time, but
it seems like I used to use the System DSNs
 

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

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,236
Members
46,822
Latest member
israfaceZa

Latest Threads

Top