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>
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>