ASP Is Fun

Learning ASP
Free Course
Basics
Functions
SQL Commands
Sample Code


Servers / Setup
Host Reviews
Server Setup
Error Tips


Contract ASP
Development

Search For:


Intro to ASP


 


Array Subscript Overflow Error



If you're using arrays, it's very likely at one point or another that you'll hit a subscript overflow error.

Arrays are defined when they are created. They can only hold a certain number of members. Say you define an array "states" to have 50 members. You will of course get an error if you try to put in member #51 - or member #101!

Any time you get an overflow error, look back at your original definition. Remember, the first member of an array is item number ZERO. Then the next spot is 1, and then 2, and so on. So if you want your array to have 12 items in it for the 12 months, and you want the array IDs to be 1 through 12, you should dimension your array to have THIRTEEN members. That will give you spots 0 through 12. You simply won't use spot zero.

Careful debugging will make it easy to see where the array overflow is occurring - and to let you dimension your array so it is the appropriate size!

All About Arrays in ASP

ASP Error Listing and Solutions

Bookmark this site so you can reference it any time you have ASP questions in the future!




ASP Main Page | ASP Ebooks | Free ASP Course | Contact Lisa
All content copyright © 2012 Minerva WebWorks LLC. All rights reserved.

Italian Wedding


Free Newsletter!

Ebooks
Intro to ASP
ASP SQL DB
Members
Shopping


Introduction to ASP

Romance Tips
Irish Romance
Italian Romance
French Romance

ASP Poll
How do you handle 500 errors?
I don't
Page does nothing
Displays error
Emails error