469,283 Members | 2,303 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,283 developers. It's quick & easy.

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

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 '07 #1
4 6006
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, steve_jack...@cox.net 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 '07 #2
st***********@cox.net 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.
Jan 26 '07 #3
Bob wrote on Fri, 26 Jan 2007 16:20:18 -0500:
st***********@cox.net 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
Jan 29 '07 #4
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.
Jan 29 '07 #5

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

29 posts views Thread by shmartonak | last post: by
6 posts views Thread by Daniel Rimmelzwaan | last post: by
2 posts views Thread by George | last post: by
2 posts views Thread by Harry | last post: by
16 posts views Thread by Frederick Gotham | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by zhoujie | last post: by
reply views Thread by suresh191 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.