Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP 3 Classic ASP Active Server Pages 3.0 > Classic ASP Databases
Password Reminder
Register
| FAQ | Members List | Calendar | 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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
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



Reply With Quote
  #2 (permalink)  
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.

Reply With Quote
  #3 (permalink)  
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
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


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



All times are GMT -4. The time now is 08:44 PM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.