Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP General > ASP/ADO/AccessDB Refresh Problem

Reply
Thread Tools

ASP/ADO/AccessDB Refresh Problem

 
 
Dave
Guest
Posts: n/a
 
      07-23-2003
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>


 
Reply With Quote
 
 
 
 
Dave
Guest
Posts: n/a
 
      07-23-2003
Could be Access. Access has very limited strength when it comes to dishing
out data online.
Access would is best suited for sharing data online if you set it up to
generate a basic html page around midnight (every night if needed). (Look
into using the OS Task Scheduler to automatically call the database file and
to close the file.) Then during the day people only be pulling the html page
and not putting any demand on Access.
You could then set up a Data Access Page (Access 2000 and above) to update
the database from within the office. (Data Access Pages are really useful on
an intranet basis. You can use them on the internet provided the user is
known. (You could update the database from home.))

Dave


"Dave" <> wrote in message
news:...
> 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>
>
>



 
Reply With Quote
 
 
 
 
Dave
Guest
Posts: n/a
 
      07-24-2003
Don't recall if I emailed directly.
Look into using SQL (in place of Access). SQL can support many simultaneous
users in real time.

Dave

"Dave" <> wrote in message
news:...
> I need more of a database that can be added to and read from on the fly,
> online. Like for example I want to take form data and insert into the
> database dynamically. Multiple users might even be doing this
> simultaneously. Am I using the wrong database solution?
>
> Thanks,
> Dave
>
>
> "Dave" <> wrote in message
> news:u%...
> > Could be Access. Access has very limited strength when it comes to

dishing
> > out data online.
> > Access would is best suited for sharing data online if you set it up to
> > generate a basic html page around midnight (every night if needed).

(Look
> > into using the OS Task Scheduler to automatically call the database file

> and
> > to close the file.) Then during the day people only be pulling the html

> page
> > and not putting any demand on Access.
> > You could then set up a Data Access Page (Access 2000 and above) to

update
> > the database from within the office. (Data Access Pages are really

useful
> on
> > an intranet basis. You can use them on the internet provided the user is
> > known. (You could update the database from home.))
> >
> > Dave
> >
> >
> > "Dave" <> wrote in message
> > news:...
> > > 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>
> > >
> > >

> >
> >

>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
ReFresh problem or target problem phal Perl Misc 6 09-15-2005 03:23 PM
JSP: Session parameters vanish on refresh. How do I keep them on refresh? Per Magnus L?vold Java 1 10-08-2004 02:52 PM
How do i refresh a datagrid from a pop up window without having to refresh the whole page? Pkenty ASP .Net Web Controls 0 05-28-2004 07:06 AM
using refresh button on the menu bar to refresh two frames. Jawahar Rajan ASP General 1 10-01-2003 09:20 PM
Problem with refresh button breaking automatic refresh brian lanning ASP .Net 0 07-29-2003 07:57 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57