SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Guru
    Join Date
    Aug 2004
    Location
    Canada
    Posts
    730
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    An array index is out of range. What does that mean?

    An array index is out of range. What does that mean?


    Request object error 'ASP 0105 : 80004005'

    Index out of range

    /kjvresp_action.asp, line 19

    An array index is out of range.
    19 is in bold:


    Code:
    <%@ LANGUAGE="VBSCRIPT" %>
    <%    Response.buffer = TRUE= true   %>
    <!--#include file="adovbs.inc"-->
    <!--#include file="isadmin.inc"-->
    <%
    if isAdmin then
        set outpostDB = Server.CreateObject("ADODB.Connection")
    Private Function GetConnectionString()
        GetConnectionString =   "Driver={Microsoft Access Driver (*.mdb)};" & _
                    "DBQ=" & Server.MapPath("kjv") & ";" & _
                    "UID=;PWD=;"
    End Function
        outpostDB = GetConnectionString()
        set deleteSet = Server.CreateObject("ADODB.RecordSet")
        deleteSet.Open "select * from results order by res_id", outpostDB, adOpenDynamic, adLockPessimistic, adCmdText
        p_thisDelete = 1
        while not deleteSet.EOF
            if cint(deleteSet("res_id")) = cint(Request.form("p_delete").item(p_thisDelete))  then
                deleteSet.Delete
                deleteSet.Update
                if p_thisDelete < Request.form("p_delete").Count then
                    p_thisDelete = p_thisDelete + 1
                end if
            end if
            deleteSet.MoveNext
        wend
        deleteSet.Close
        set deleteSet = Nothing
    
    
        set outpostDB = Nothing
    
        Response.Clear
        Response.Redirect "http://127.0.0.1/kjvresp.asp"
    else
    
        Response.Write "You do not have access to this page."
    
    end if
    %>
    </BODY>
    </HTML>

  2. #2
    SitePoint Addict sinapra's Avatar
    Join Date
    Sep 2004
    Location
    secunderabad
    Posts
    272
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    whats p_delete?
    Regards

    Its Great to work and Be Merry!!!!!!!!

  3. #3
    SitePoint Guru
    Join Date
    Aug 2004
    Location
    Canada
    Posts
    730
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    isn't that the form name?

    Request.form("p_delete").

  4. #4
    The doctor is in... silver trophy MarcusJT's Avatar
    Join Date
    Jan 2002
    Location
    London
    Posts
    3,509
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    No, the form name is never sent to the server - it's only used client-side. Only one form can be submitted at a time.
    MarcusJT
    - former ASP web developer / former SPF "ASP Guru"
    - *very* old blog with some useful ASP code

    - Please think, Google, and search these forums before posting!


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •