Wrox Programmer Forums
|
Classic ASP Professional For advanced coder questions in ASP 3. NOT for ASP.NET 1.0, 1.1, or 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Professional section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old June 24th, 2004, 09:54 AM
Authorized User
 
Join Date: Jul 2003
Posts: 56
Thanks: 0
Thanked 0 Times in 0 Posts
Default Runtime Error - Is it an array issue?

Hi there

One of my pages has suddenly stopped working and i'm trying to figure out what it could be associated with.

Is anyone able to help me with the following:

I have a as ASP page. Data is fed to this page from another computer and each piece of information is separated by a '|'. So, I am using an array to spilt the data e.g. aryLineData = split(dataline,"|")and then build a table.

A user with a lot of data is getting the following error message on screen:
Microsoft VBScript Runtime Error '800a0009' Subscript Out Of Range: '[Number: 1]'.

Now, it could be a number of things:
1. the computer that 'feeds' the data to the page needs to be rebooted
2. There is a problem with the array function - as I am fairly new to using arrays, do they hold a maximum amount of data before breaking?
3. Another program i'm also using on the page, ASPTear, may not be able to cope with the amount of data - does anyone know anything about ASPTear and whether this might be the case?

Can anyone shed some light with points 2 and 3 and help me to solve my problem?

Thanks in advance

Lucy Robinson

 
Old June 24th, 2004, 10:39 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 2,480
Thanks: 0
Thanked 1 Time in 1 Post
Default

Can you explain on how the data is been handled after using split() method? Because the error that you mentioned is something related to trying to access the subscript that is out of arrays range (say array has a maximum subscript of 3, but you may be trying to accessing 4).

So in your case, it should be like the "dataline" variable should not be containing any "|" in it, so on split the "aryLineData" contains only value in its ZEROth subscript and you may be trying to access [b]aryLineData(1)[/]b

So you do a response.write dataline before the line that uses SPLIT() method.

Code:
Response.Write dataline
Response.End
aryLineData = split(dataline,"|")
This should shed some/much light on that issue;).

Hope that helps.
Cheers!

_________________________
-Vijay G
Strive for Perfection





Similar Threads
Thread Thread Starter Forum Replies Last Post
hi i got runtime error 13 Type Mismatch error sriharsha345 Access VBA 2 February 21st, 2008 09:30 AM
runtime error??? jeffreyJS ASP.NET 2.0 Basics 4 September 14th, 2006 04:07 AM
Runtime Error whiterainbow ASP.NET 2.0 Professional 2 September 12th, 2006 01:20 AM
mysterious error runtime error '451' coyotworks Excel VBA 1 May 12th, 2006 03:57 PM
error when sorting an Array of Array nancy VBScript 2 February 17th, 2005 12:57 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.