logo
g Text Version
Beauty & Self
Books & Music
Career
Computers
Education
Family
Food & Wine
Health & Fitness
Hobbies & Crafts
Home & Garden
Money
News & Politics
Relationships
Religion & Spirituality
Sports
Travel & Culture
TV & Movies

dailyclick
Bored? Games!
Nutrition
Postcards
Take a Quiz
Rate My Photo

new
Creativity
Family Travel
Southwest USA
Irish Culture
Home Finance
Comedy Movies
Romance Novels


dailyclick
All times in EST

Clairvoyance: 08:00 PM

Full Schedule
g
g ASP Site

BellaOnline's ASP Editor

g

Array Subscript Overflow Error

Guest Author - Lisa Shea

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
This site needs an editor - click to learn more!

Add Array+Subscript+Overflow+Error to Twitter Add Array+Subscript+Overflow+Error to Facebook Add Array+Subscript+Overflow+Error to MySpace Add Array+Subscript+Overflow+Error to Del.icio.us Digg Array+Subscript+Overflow+Error Add Array+Subscript+Overflow+Error to Yahoo My Web Add Array+Subscript+Overflow+Error to Google Bookmarks Add Array+Subscript+Overflow+Error to Stumbleupon Add Array+Subscript+Overflow+Error to Reddit




RSS | Related Articles | Editor's Picks Articles | Top Ten Articles | Previous Features | Site Map


For FREE email updates, subscribe to the ASP Newsletter


Past Issues


print
Printer Friendly
bookmark
Bookmark
tell friend
Tell a Friend
forum
Forum
email
Email Editor


Content copyright © 2014 by Lisa Shea. All rights reserved.
This content was written by Lisa Shea. If you wish to use this content in any manner, you need written permission. Contact BellaOnline Administration for details.

g


g features
Best uses for RSS

RSS and its future.

Force Download Dialog box with ASP

Archives | Site Map

forum
Forum
email
Contact

Past Issues
memberscenter


vote
Poetry
Daily
Weekly
Monthly
Less than Monthly



BellaOnline on Facebook
g


| About BellaOnline | Privacy Policy | Advertising | Become an Editor |
Website copyright © 2014 Minerva WebWorks LLC. All rights reserved.


BellaOnline Editor