Error code 80020009 "Exception Occured"

Discussion in 'ASP General' started by dmiller23462, Aug 17, 2004.

  1. dmiller23462

    dmiller23462 Guest

    Hey guys, I'm back again....I've got the results displaying that I
    wanted but instead of having a "next" or "previous" link displayed I
    am getting the error msg below (I actually get the data that I'm
    supposed to get meaning that my query seems to be working fine but
    instead of making its way to the INCLUDE file (bottom navigation bar)
    it displays the following error msg instead of the included nav bar...

    ***
    error '80020009'
    Exception occurred.

    /jax/wh/Online_Forms/Secured_Archives/search_files/search_results_hour.asp,
    line 57
    ***

    "Line 57" is the line that says

    Response.Write "<b>Name :</b> " & rs("name")

    (the start of my display)...

    I think that it's having trouble figuring out what to do to "close up"
    my recordset query....Can you take a look and let me know what I'm
    doing wrong or any suggestions?

    I searched thru all previous posts and couldn't find anything that
    explained it sufficiently....I also found a post at <a
    href="http://www.aspfaq.com/show.asp?id=2188">ASP Faq's</a> that
    explained to some degree so instead of "SELECT *" I input all the
    corresponding columns in the database...Still no luck....

    <!-- #INCLUDE VIRTUAL="/_borders/top_nav.asp" -->
    <%

    Mode = request.form("mode")
    Name = request.form("name")
    Shift = request.form("shift")
    Wave = request.form("wave")
    Carton = request.form("carton")
    Location = request.form("location")
    License = request.form("license")
    Sku = request.form("sku")
    Qty = request.form("quantity")
    Reason = request.form("reason")
    Comments = request.form("comments")
    Results = DateAdd("h", -1, Now())

    '*****************************************************************************
    '* DATABASE APPENDING
    *
    '*****************************************************************************
    'create db connection
    Set dbconn = Server.CreateObject("ADODB.Connection")

    'create recordset object
    Set rs = Server.CreateObject("ADODB.Recordset")

    'open db in a DSN-less method
    dbconn.Open "PROVIDER=MICROSOFT.JET.OLEDB.4.0;DATA SOURCE="&
    Server.MapPath("/jax/wh/Online_Forms/Secured_Archives/search_files/shortage.mdb")

    If IsEmpty (Request.QueryString("pageNum")) Then
    curPage = 1
    Else
    curPage = CInt(Request.QueryString("pageNum"))
    End If

    'specify more info about rs
    rs.CursorLocation = 3
    rs.CursorType = 3
    rs.PageSize = 3
    rs.open "shortage", dbconn

    'sql statement to return input values drawn from html fields within
    previous week
    SQLqry = "SELECT name, shift, wave, carton, location, license, sku,
    qty, reason, comments, date FROM shortage WHERE date >= #" & Results &
    "# ORDER BY date"

    'display results of statement on screen for debugging
    'Response.Write "<h3><b><u>" & (SQLqry) & "</u></b></h3><br>"

    rs.Close
    rs.Open SQLqry

    If Not rs.EOF Then
    rs.AbsolutePage = curPage
    Response.Write "<p>You are on page: " & curPage & " of " &
    rs.PageCount
    Response.Write "<br>"
    Response.Write "<br>"

    For i = 1 to rs.PageSize
    Response.Write "<b>Name :</b> " & rs("name")
    Response.Write "<br>"
    Response.Write "<b>Shift :</b> " & rs("shift")
    Response.Write "<br>"
    Response.Write "<b>Wave Number :</b> " & rs("wave")
    Response.Write "<br>"
    Response.Write "<b>Carton Number :</b> " & rs("carton")
    Response.Write "<br>"
    Response.Write "<b>Location :</b> " & rs("location")
    Response.Write "<br>"
    Response.Write "<b>License :</b> " & rs("license")
    Response.Write "<br>"
    Response.Write "<b>SKU :</b> " & rs("sku")
    Response.Write "<br>"
    Response.Write "<b>Quantity :</b> " & rs("qty")
    Response.Write "<br>"
    Response.Write "<b>Reason :</b> " & rs("reason")
    Response.Write "<br>"
    Response.Write "<b>Comments :</b> " & rs("comments")
    Response.Write "<br>"
    Response.Write "<b>Date Submitted :</b> " & rs("date")
    Response.Write "<hr>"
    rs.MoveNext
    Next

    ElseIf rs.EOF Then
    Response.Write "<h3><b>I'm sorry but no records were found matching
    that description!</b></h3>"
    End If

    If curPage > 1 then
    Response.Write "<a href='search_results_hour.asp?pageNum=" &
    curPage-1 & "'>Previous</a>"
    If curPage < rs.PageCount then
    Response.Write " | "
    end if
    end if
    If curPage < rs.PageCount then
    Response.Write "<a href='search_results_hour.asp?pageNum=" &
    curPage+1 & "'>Next</a>"
    end if


    'close recordset
    rs.Close

    'zero out recordset object
    Set rs = Nothing

    'smack around the db connection until it lets go
    dbconn.Close

    'terminate db connection with extreme prejudice
    set dbconn = nothing

    Response.Write "<br><a href='../Archives.asp'>Return to Archives</a>"
    Response.Write "<br><a href='../../Shortage.asp'>Return to Shortage
    Submission Form</a>"
    Response.Write "<br><a href='../../../default.asp'>Return to Warehouse
    Operations</a>"
    %><!-- #INCLUDE VIRTUAL="/_borders/bottom_nav.asp" -->
    dmiller23462, Aug 17, 2004
    #1
    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. J. Muenchbourg

    Exception occured error

    J. Muenchbourg, Jul 2, 2003, in forum: ASP General
    Replies:
    3
    Views:
    109
    Tom B
    Jul 2, 2003
  2. olivier Micheli

    ADODB.Field error '80020009

    olivier Micheli, Aug 15, 2003, in forum: ASP General
    Replies:
    0
    Views:
    196
    olivier Micheli
    Aug 15, 2003
  3. psaban

    error '80020009' Exception occurred

    psaban, Jun 10, 2004, in forum: ASP General
    Replies:
    0
    Views:
    148
    psaban
    Jun 10, 2004
  4. M Naeem Baig

    ADSI 80020009 Error on windows 2003

    M Naeem Baig, Jun 14, 2004, in forum: ASP General
    Replies:
    0
    Views:
    200
    M Naeem Baig
    Jun 14, 2004
  5. dmiller23462

    Error code 80020009 "Exception Occured"

    dmiller23462, Aug 17, 2004, in forum: ASP General
    Replies:
    2
    Views:
    305
    dmiller23462
    Aug 18, 2004
Loading...

Share This Page