Welcome to WebmasterWorld Guest from

Forum Moderators: ocean10000

Message Too Old, No Replies

Request object error 'ASP 0105 : 80004005'



6:47 pm on Dec 6, 2002 (gmt 0)

10+ Year Member

Request object error 'ASP 0105 : 80004005'

Index out of range

/ml49/si/12-4/searchclass.asp, line 44

An array index is out of range.

the part of the code that gives this error is :
'Check to see if form has been submitted
If Request.QueryString("submit") = "submit" OR _
Request.QueryString("search")<> "" OR _
(Request.QueryString("search")= "" AND Request.QueryString.key(1) = "search") Then
'Check for Errors
Dim strErrors
strErrors = isValid()
If strErrors<> "" Then
Response.Write"<span class='error'>" & strErrors & "</span>"
'Get Results
Dim objRecordset
Set objRecordset = getMatches()

'Output Results

The Request.QueryString.key(1)="search" is the reason why I believe we get the message. Cos when the page loads first (before the page is submitted) there doesn's exist key-value(key/item) pair to correspond with the request.querystring.key(1).... what could be the possible solutions to this issue?


7:21 pm on Dec 6, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member

Is this a form? If method method=post thee is no querystring colection

You can avoid problems by just using (in ASP) :


7:24 pm on Dec 6, 2002 (gmt 0)

WebmasterWorld Senior Member korkus2000 is a WebmasterWorld Top Contributor of All Time 10+ Year Member

Why are you using Request.Querystring.key? Will the name be different?


8:02 pm on Dec 6, 2002 (gmt 0)

10+ Year Member

this is a form with a Method='get'


8:05 pm on Dec 6, 2002 (gmt 0)

10+ Year Member

I found the solution...

The reason was Request.QueryString.Key(1) was checking for the key-value pairs and when the page first loaded there werent any key-value pairs. so I used an if-then statement to see if the text field of the form was filled... if it wasnt then it would do nothing otherwise it would check for the key-value string... thanks for the replies...


Featured Threads

Hot Threads This Week

Hot Threads This Month