ASP/ADO/AccessDB Refresh Problem

Discussion in 'ASP General' started by Dave, Jul 23, 2003.

  1. Dave

    Dave Guest

    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>
     
    Dave, Jul 23, 2003
    #1
    1. Advertising

  2. Dave

    Dave Guest

    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>
    >
    >
     
    Dave, Jul 23, 2003
    #2
    1. Advertising

  3. Dave

    Dave Guest

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

    > >
    > >

    >
    >
     
    Dave, Jul 24, 2003
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. John Melvin
    Replies:
    0
    Views:
    294
    John Melvin
    Oct 14, 2003
  2. nita
    Replies:
    1
    Views:
    908
    Saravana
    Nov 20, 2004
  3. ronaldlee

    Transfer ADO Code to ADO.NET

    ronaldlee, Dec 17, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    494
    Kevin Spencer
    Dec 17, 2004
  4. =?Utf-8?B?YWxleDQ0NA==?=

    Error opening AccessDB from the newly spawned thread

    =?Utf-8?B?YWxleDQ0NA==?=, Sep 29, 2005, in forum: ASP .Net
    Replies:
    2
    Views:
    340
    =?Utf-8?B?YWxleDQ0NA==?=
    Sep 30, 2005
  5. Replies:
    1
    Views:
    650
    =?Utf-8?B?UGV0ZXIgQnJvbWJlcmcgW0MjIE1WUF0=?=
    May 29, 2006
Loading...

Share This Page