Subscript Out Of Range Error 
Author Message
 Subscript Out Of Range Error

I have written a report in Crystal Reports and have an ASP page that
conducts a search on 5 fields.  When I select the criteria, and try to view
the report based on the criteria entered, I get the following error message:

Microsoft VBScript runtime error '800a0009'

Subscript out of range

/Production/Engineering/ChangeRequest.asp, line 139

I am somewhat new to web programming, so I can't interpret this.  Any ideas?



Mon, 31 May 2004 22:53:22 GMT  
 Subscript Out Of Range Error
If you have an array that contains five items and you request the sixth
item, you'll get that error since there is no sixth item.

Also, vbscript counts starting at 0.  So, if you have 5 items in an array,
they would be:

something(0)
something(0)
something(0)
something(0)


Quote:
> I have written a report in Crystal Reports and have an ASP page that
> conducts a search on 5 fields.  When I select the criteria, and try to
view
> the report based on the criteria entered, I get the following error
message:

> Microsoft VBScript runtime error '800a0009'

> Subscript out of range

> /Production/Engineering/ChangeRequest.asp, line 139

> I am somewhat new to web programming, so I can't interpret this.  Any
ideas?



Mon, 31 May 2004 23:33:18 GMT  
 Subscript Out Of Range Error
(LAST REPLY SENT ACCIDENTALLY...)

If you have an array that contains five items and you request the sixth
item, you'll get that error since there is no sixth item.

Also, vbscript counts starting at 0.  So, if you have 5 items in an array,
they would be:

something(0)
something(1)
something(2)
something(3)
something(4)

So, that would mean that if you're doing like a For x = 1 to 5, you'd get
that error, because you should actually do For x = 0 to 4.

Ray at work


Quote:
> I have written a report in Crystal Reports and have an ASP page that
> conducts a search on 5 fields.  When I select the criteria, and try to
view
> the report based on the criteria entered, I get the following error
message:

> Microsoft VBScript runtime error '800a0009'

> Subscript out of range

> /Production/Engineering/ChangeRequest.asp, line 139

> I am somewhat new to web programming, so I can't interpret this.  Any
ideas?



Mon, 31 May 2004 23:34:30 GMT  
 Subscript Out Of Range Error

Thanks, but I did not create an array, so this message makes no sense.

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!



Mon, 31 May 2004 23:50:45 GMT  
 Subscript Out Of Range Error
That sucks for you.  Figure it out yourself then.

Ray at work


Quote:

> Thanks, but I did not create an array, so this message makes no sense.

> *** Sent via Developersdex http://www.developersdex.com ***
> Don't just participate in USENET...get rewarded for it!



Tue, 01 Jun 2004 02:23:06 GMT  
 Subscript Out Of Range Error
Ray,

Thanks for your first reply.  

This error still makes no sense to me, but based on your second reply, you aren't going to help me.  

I was under the impression that this was a professional avenue for giving/receiving programming help.  I guess I was wrong.

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!



Tue, 01 Jun 2004 03:54:43 GMT  
 Subscript Out Of Range Error
I was under the same impression too.  I guess I was wrong, but I was wrong
first.

Ray at work


Quote:
> Ray,

> Thanks for your first reply.

> This error still makes no sense to me, but based on your second reply, you

aren't going to help me.
Quote:

> I was under the impression that this was a professional avenue for

giving/receiving programming help.  I guess I was wrong.
Quote:

> *** Sent via Developersdex http://www.developersdex.com ***
> Don't just participate in USENET...get rewarded for it!



Tue, 01 Jun 2004 04:46:58 GMT  
 Subscript Out Of Range Error
Janet,

What you were wrong about is the way you have posed your problem.

There is an array involved contrary to your instance that there is not
otherwise you would not receive the specific error you are receiving. Can
you call you auto mechanic and say "My car won't start but the radio works"
and expect him to know exactly what the problem is, I think not.

The error you listed is not a mystery, it even give the live number where
the offending code is. Granted it could be a syntax error that makes the
inturperter think you are reffering to an array but how would we know
without the code? If you really want help, post the code otherwise live with
the problem. Without the code Ray's first response make perfect sense (and I
have programmed many languages from fortran, cobol, Pascal, 8 bit BASIC to
Visual Basic right up to 6.0).

Bob L



Tue, 01 Jun 2004 04:52:30 GMT  
 Subscript Out Of Range Error
I apologize if my post was not clear.  I guess I could have been more specific, but I just wanted to throw it out there to see if anyone had experience with this error, and I got my answer.  However, I got a little bit of attitude as well, which I didn't appreciate.  It's very discouraging to a new programmer to be shot down that way, so I guess from now on, I'll just 'figure it out myself'.  Please don't respond...this thread has gone on long enough with no real content related to programming.

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!



Tue, 01 Jun 2004 20:38:45 GMT  
 Subscript Out Of Range Error
Up and coming programmers have to be little more humble.  Your "your message
makes now sense" was not an example of humility.

Ray at work as a programmer


I apologize if my post was not clear.  I guess I could have been more
specific, but I just wanted to throw it out there to see if anyone had
experience with this error, and I got my answer.  However, I got a little
bit of attitude as well, which I didn't appreciate.  It's very discouraging
to a new programmer to be shot down that way, so I guess from now on, I'll
just 'figure it out myself'.  Please don't respond...this thread has gone on
long enough with no real content related to programming.

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!



Tue, 01 Jun 2004 21:59:40 GMT  
 Subscript Out Of Range Error
Janet,

I'd like to offer some friendly advice (if you're still lurking ;-)...

The exchanges on this thread have (IMHO) been very mild.  If you look through other threads (at least in the scripting NGs), you would see that even mild flames like this are a rarity.

One thing I learned early on when venturing into the "public help domain" is to have a thick skin and take *everything* with a grain of salt ;-)...

Trust me - if you let this one keep you away, it will only be your loss.

--
Michael Harris
Microsoft.MVP.Scripting
--

I apologize if my post was not clear.  I guess I could have been more specific, but I just wanted to throw it out there to see if anyone had experience with this error, and I got my answer.  However, I got a little bit of attitude as well, which I didn't appreciate.  It's very discouraging to a new programmer to be shot down that way, so I guess from now on, I'll just 'figure it out myself'.  Please don't respond...this thread has gone on long enough with no real content related to programming.

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!



Tue, 01 Jun 2004 23:57:13 GMT  
 Subscript Out Of Range Error

I meant the error message, Ray, not your message.  OK...I'm really done with this thread now, and in case anyone cares, I did figure out the problem.  Thanks for your help.

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!



Wed, 02 Jun 2004 01:08:32 GMT  
 
 [ 12 post ] 

 Relevant Pages 

1. HELP! Subscript Out Of Range error referencing array

2. Subscript out of range error

3. Subscript out of range error

4. Subscript out of range error

5. AddShapeRecordDetected Error: Subscript out of range

6. Defining an array and getting Subscript Out of Range Error

7. help with subscript out of range error

8. Problems With FlexGrid And Subscript Out Of Range Error

9. runtime error 9, subscript out of range

10. Subscript out of range (Error 9)

11. Redim causes Subscript Out of Range (Error 9)

12. Subscript out of range error problem

 

 
Powered by phpBB® Forum Software