Wrox Programmer Forums
| Search | Today's Posts | Mark Forums Read
Classic ASP Databases Discuss using ASP 3 to work with data in databases, including ASP Database Setup issues from the old P2P forum on this specific subtopic. See also the book forum Beginning ASP.NET Databases for questions specific to that book. 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 Databases 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 August 4th, 2004, 10:23 PM
Registered User
 
Join Date: Mar 2004
Location: , , .
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Subscript out of range: '[number: 49]'

Hi guys
I get an error message when i am using an array in my project using VBcript with ASP.

...
dim FavList(51,5)
...
        for i=0 to ubound(FavList,2)
' FavList_SubTotal = FavList_SubTotal + (FavList(i,4))
                next
...
...

i get an error message like this
Microsoft VBScript runtime (0x800A0009)
Subscript out of range: '[number: 49]'
inc_FavList.asp, line 37

any help would be appriciated.

Hameed



 
Old August 5th, 2004, 03:53 AM
Friend of Wrox
 
Join Date: Sep 2003
Location: Mentiri, Muara, Brunei.
Posts: 363
Thanks: 0
Thanked 1 Time in 1 Post
Default

hi hameed,

  Did you test the loop with alert statement(if client side or response.write if serverside)? As per the code it loops thru

FavList(0,4), FavList(1,4), FavList(2,4), FavList(3,4), FavList(4,4), FavList(5,4)

Coz ubound(FavList,2) is 5

So, i didnt find the subscript 49 there.

 
Old August 5th, 2004, 08:32 AM
Friend of Wrox
 
Join Date: Jun 2003
Location: Bangalore, KA, India.
Posts: 2,480
Thanks: 0
Thanked 1 Time in 1 Post
Default

Seems you are using your array subscripts interchanged. Check that out.

_________________________
- Vijay G
Strive for Perfection




Similar Threads
Thread Thread Starter Forum Replies Last Post
"Subscript out of range" in acFormPivotChart jilly Access VBA 0 April 23rd, 2008 08:52 PM
Array, Subscript out of range. koss77 VB How-To 4 August 21st, 2006 09:35 AM
Subscript out of range: '[number: 0]' jim_h Classic ASP Professional 0 February 24th, 2006 07:24 PM
Subscript out of range rfrancisco Classic ASP Components 1 February 13th, 2006 08:25 PM
Subscript out of range crmpicco Classic ASP Basics 4 March 22nd, 2005 06:55 PM





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