Request object, ASP 0105 (0x80004005) An array index is out of range.

Discussion in 'ASP General' started by steve_jackson@cox.net, Jan 26, 2007.

  1. Guest

    I get this error, when I am trying to update a table in an Access DB
    through our intranet.

    Here is the section of code that is generating the error:

    FormItemID = Request.Form("FID")
    StoreNo = Request.Form("STNO")
    OrderQty = Request.Form("OQTY")

    %>
    <%
    strDBPath = Server.MapPath("\Databases\FirmOrder.mdb")
    set cnnSimple = Server.CreateObject("ADODB.Connection")
    cnnSimple.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" &
    strDBPath & ";"

    For i=1 to Request.Form("OQTY").Count

    ' IF Request.Form("OQTY" & i) <> "" THEN

    mySQL = " INSERT INTO tblFIRMORDER (FormItemID, StoreNo, OrderQty)
    VALUES"
    mySQL = mySQL & " (" & Request.Form("FID")(i) & ", '" &
    Request.Form("STNO")(i) & "', " & Request.Form("OQTY")(i) & ")"
    cnnSimple.execute(mySQL)

    Can anyone tell me why I am getting the error, and how do i fix it? I
    can find alot of references to ASP 105 is an array out of range but
    what does that mean and how do I fix it?

    Thanks,
    OkieMan
     
    , Jan 26, 2007
    #1
    1. Advertising

  2. Guest

    SORRY, the error occurs in the line of code that starts with:
    mySQL=mySQL &
    3rd row from the last on the post.

    OkieMan

    On Jan 26, 2:57 pm, wrote:
    > I get this error, when I am trying to update a table in an Access DB
    > through our intranet.
    >
    > Here is the section of code that is generating the error:
    >
    > FormItemID = Request.Form("FID")
    > StoreNo = Request.Form("STNO")
    > OrderQty = Request.Form("OQTY")
    >
    > %>
    > <%
    > strDBPath = Server.MapPath("\Databases\FirmOrder.mdb")
    > set cnnSimple = Server.CreateObject("ADODB.Connection")
    > cnnSimple.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" &
    > strDBPath & ";"
    >
    > For i=1 to Request.Form("OQTY").Count
    >
    > ' IF Request.Form("OQTY" & i) <> "" THEN
    >
    > mySQL = " INSERT INTO tblFIRMORDER (FormItemID, StoreNo, OrderQty)
    > VALUES"
    > mySQL = mySQL & " (" & Request.Form("FID")(i) & ", '" &
    > Request.Form("STNO")(i) & "', " & Request.Form("OQTY")(i) & ")"
    > cnnSimple.execute(mySQL)
    >
    > Can anyone tell me why I am getting the error, and how do i fix it? I
    > can find alot of references to ASP 105 is an array out of range but
    > what does that mean and how do I fix it?
    >
    > Thanks,
    > OkieMan
     
    , Jan 26, 2007
    #2
    1. Advertising

  3. wrote:
    > I get this error, when I am trying to update a table in an Access DB
    > through our intranet.
    >
    > Here is the section of code that is generating the error:
    >
    > FormItemID = Request.Form("FID")
    > StoreNo = Request.Form("STNO")
    > OrderQty = Request.Form("OQTY")
    >
    > %>
    > <%
    > strDBPath = Server.MapPath("\Databases\FirmOrder.mdb")
    > set cnnSimple = Server.CreateObject("ADODB.Connection")
    > cnnSimple.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" &
    > strDBPath & ";"
    >
    > For i=1 to Request.Form("OQTY").Count
    >
    > ' IF Request.Form("OQTY" & i) <> "" THEN
    >
    > mySQL = " INSERT INTO tblFIRMORDER (FormItemID, StoreNo, OrderQty)
    > VALUES"
    > mySQL = mySQL & " (" & Request.Form("FID")(i) & ", '" &
    > Request.Form("STNO")(i) & "', " & Request.Form("OQTY")(i) & ")"
    > cnnSimple.execute(mySQL)
    >
    > Can anyone tell me why I am getting the error, and how do i fix it? I
    > can find alot of references to ASP 105 is an array out of range but
    > what does that mean and how do I fix it?
    >

    You verified that OQTY contained multiple values, but you never verified
    that STNO contained the same number of values.

    --
    Microsoft MVP -- ASP/ASP.NET
    Please reply to the newsgroup. The email account listed in my From
    header is my spam trap, so I don't check it very often. You will get a
    quicker response by posting to the newsgroup.
     
    Bob Barrows [MVP], Jan 26, 2007
    #3
  4. Bob wrote on Fri, 26 Jan 2007 16:20:18 -0500:

    > wrote:
    >> I get this error, when I am trying to update a table in an Access DB
    >> through our intranet.
    >>
    >> Here is the section of code that is generating the error:
    >>
    >> FormItemID = Request.Form("FID")
    >> StoreNo = Request.Form("STNO")
    >> OrderQty = Request.Form("OQTY")
    >>
    >> %>
    >> <%
    >> strDBPath = Server.MapPath("\Databases\FirmOrder.mdb")
    >> set cnnSimple = Server.CreateObject("ADODB.Connection")
    >> cnnSimple.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" &
    >> strDBPath & ";"
    >>
    >> For i=1 to Request.Form("OQTY").Count
    >>
    >> ' IF Request.Form("OQTY" & i) <> "" THEN
    >>
    >> mySQL = " INSERT INTO tblFIRMORDER (FormItemID, StoreNo, OrderQty)
    >> VALUES"
    >> mySQL = mySQL & " (" & Request.Form("FID")(i) & ", '" &
    >> Request.Form("STNO")(i) & "', " & Request.Form("OQTY")(i) & ")"
    >> cnnSimple.execute(mySQL)
    >>
    >> Can anyone tell me why I am getting the error, and how do i fix it? I
    >> can find alot of references to ASP 105 is an array out of range but
    >> what does that mean and how do I fix it?
    >>

    > You verified that OQTY contained multiple values, but you never verified
    > that STNO contained the same number of values.
    >



    Or FID ;)

    Dan
     
    Daniel Crichton, Jan 29, 2007
    #4
  5. Daniel Crichton wrote:
    > Bob wrote on Fri, 26 Jan 2007 16:20:18 -0500:
    >> You verified that OQTY contained multiple values, but you never
    >> verified that STNO contained the same number of values.
    >>

    >
    >
    > Or FID ;)
    >


    I left that as an exercise for the reader ...

    --
    Microsoft MVP -- ASP/ASP.NET
    Please reply to the newsgroup. The email account listed in my From
    header is my spam trap, so I don't check it very often. You will get a
    quicker response by posting to the newsgroup.
     
    Bob Barrows [MVP], Jan 29, 2007
    #5
    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. Steve
    Replies:
    0
    Views:
    5,361
    Steve
    Jul 1, 2003
  2. yyt

    Index was out of range?

    yyt, Dec 18, 2003, in forum: ASP .Net
    Replies:
    1
    Views:
    486
    Hans Kesting
    Dec 19, 2003
  3. Charles Vaz

    ASP 0105 (0X80004005)

    Charles Vaz, Oct 9, 2003, in forum: ASP General
    Replies:
    3
    Views:
    152
    Bob Barrows
    Oct 10, 2003
  4. Andy
    Replies:
    6
    Views:
    303
    Andy K
    Feb 9, 2004
  5. Tomasz Chmielewski

    sorting index-15, index-9, index-110 "the human way"?

    Tomasz Chmielewski, Mar 4, 2008, in forum: Perl Misc
    Replies:
    4
    Views:
    321
    Tomasz Chmielewski
    Mar 4, 2008
Loading...

Share This Page