Photo Gallery Member List Search Calendars FAQ Ticket List Log Out


RE: Subscript out of range

 
Logged in as: Guest
arrSession:exec spGetSession 2,2,47168
 Active Users: There are 0 members and 0 guests.
 Users viewing this topic: none
 

 

 
  
  Printable Version
All Forums >> [Scripting] >> WSH & Client Side VBScript >> RE: Subscript out of range
  Do you like VisualBasicScript.com? Link to us and help spread the word about our forum. Thanks!
Page: <<   < prev  1 [2]
Login
Message << Older Topic   Newer Topic >>
 RE: Subscript out of range - 5/30/2007 8:01:07 AM   
  ebgreen


Posts: 4613
Score: 31
Joined: 7/12/2005
Status: offline
We really need to determine the real structure of the array. Could you put this code at the top of the MakeCalendar routine and let us know what the output is?

MsgBox "Dimension 1 UBound = " & UBound(theArray, 1)
MsgBox "Dimension 2 UBound = " & UBound(theArray, 2)

_____________________________

"... when you are good and crazy, oooh, oooh, oooh, the sky is the limit!" - The Tick
Goog places to start:http://www.visualbasicscript.com/m_24727/tm.htm
http://www.visualbasicscript.com/m_47117/tm.htm

(in reply to webren)
 
 
Post #: 21
 
 RE: Subscript out of range - 5/30/2007 8:07:33 AM   
  webren


Posts: 16
Score: 0
Joined: 5/17/2007
From: College Park, MD
Status: offline
I get a permission denied error when trying to show the MsgBox, but instead I just Response.Write the UBound(theArray,1) and UBound(theArray, 2).  The values I got are 14 and 28, respectively.

(in reply to ebgreen)
 
 
Post #: 22
 
 RE: Subscript out of range - 5/31/2007 6:41:12 AM   
  webren


Posts: 16
Score: 0
Joined: 5/17/2007
From: College Park, MD
Status: offline
Any other ideas, ebgreen?

(in reply to ebgreen)
 
 
Post #: 23
 
 RE: Subscript out of range - 5/31/2007 7:18:25 AM   
  ebgreen


Posts: 4613
Score: 31
Joined: 7/12/2005
Status: offline
Sorry, I haven't had a lot of time to look at it today. Basicly the way to track down a problem like this is to use copious quantities of Echos (Response.Writes) to determine what you think the value for the counter variables should be and what they really are. Essentially star near the line that errors and put a Response.Write just before any line that accesses the array. Have it write out the UBound for each dimension of the array and the value of any variables that are being used to index the array. to be honest with you, if this were my problem, I would scrap the 2-d array altogether and work with an ADO recordset directly from the DB.

_____________________________

"... when you are good and crazy, oooh, oooh, oooh, the sky is the limit!" - The Tick
Goog places to start:http://www.visualbasicscript.com/m_24727/tm.htm
http://www.visualbasicscript.com/m_47117/tm.htm

(in reply to webren)
 
 
Post #: 24
 
 RE: Subscript out of range - 5/31/2007 8:23:36 AM   
  webren


Posts: 16
Score: 0
Joined: 5/17/2007
From: College Park, MD
Status: offline
I actually figured out what I was trying to do.  Thanks for your time and quick responses.  I appreciate it!

(in reply to ebgreen)
 
 
Post #: 25
 
 
Page:  <<   < prev  1 [2]
 
  

If you found our site useful please link to us <a href="http://www.visualbasicscript.com">VisualBasicScript.com</a>.
All Forums >> [Scripting] >> WSH & Client Side VBScript >> RE: Subscript out of range Page: <<   < prev  1 [2]
Jump to:





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts