D
Dave
Hey,
I'm running a localhost web server...W2K with IIS 5.0, and I'm trying to use
ASP/ADO to access my Access database. When I first load the page, everything
works, but if i hit refresh (F5 or even Ctrl-F5), I get "page cannot be
displayed" with the problem line of code being the database Open command
(the starred line in the snippet below). If I press Refresh repeatedly, that
doesn't help. After a minute or two, refreshing the page does access the
database, but then the problem begins again with the very next refresh. I'm
not sure where the problem is...in Access, ASP, ADO, IIS, or something
important I left out of the HTML. Has anyone experienced this?
Thanks,
Dave
<snip>
<%@ Language="JScript" %>
<html>
<head>
<title>DataBase Fun!</title>
</head>
<body>
<%
Session.Timeout = 15;
conn = Server.CreateObject("ADODB.Connection");
**********conn.Open("obdc_exmp");
%>
<%
strSQLQuery = "SELECT * FROM names";
rs = Server.CreateObject("ADODB.Recordset");
rs.Open(strSQLQuery, conn, 3, 3);
%>
<%
while (!rs.EOF)
{
Response.Write(rs("last_name") + ", " + rs("first_name") + "<br>");
rs.MoveNext();
}
%>
<%
rs.Close();
rs = null;
conn.Close();
conn = null;
%>
</body>
</html>
</snip>
I'm running a localhost web server...W2K with IIS 5.0, and I'm trying to use
ASP/ADO to access my Access database. When I first load the page, everything
works, but if i hit refresh (F5 or even Ctrl-F5), I get "page cannot be
displayed" with the problem line of code being the database Open command
(the starred line in the snippet below). If I press Refresh repeatedly, that
doesn't help. After a minute or two, refreshing the page does access the
database, but then the problem begins again with the very next refresh. I'm
not sure where the problem is...in Access, ASP, ADO, IIS, or something
important I left out of the HTML. Has anyone experienced this?
Thanks,
Dave
<snip>
<%@ Language="JScript" %>
<html>
<head>
<title>DataBase Fun!</title>
</head>
<body>
<%
Session.Timeout = 15;
conn = Server.CreateObject("ADODB.Connection");
**********conn.Open("obdc_exmp");
%>
<%
strSQLQuery = "SELECT * FROM names";
rs = Server.CreateObject("ADODB.Recordset");
rs.Open(strSQLQuery, conn, 3, 3);
%>
<%
while (!rs.EOF)
{
Response.Write(rs("last_name") + ", " + rs("first_name") + "<br>");
rs.MoveNext();
}
%>
<%
rs.Close();
rs = null;
conn.Close();
conn = null;
%>
</body>
</html>
</snip>