Wrox Programmer Forums
|
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 January 29th, 2005, 11:46 PM
Authorized User
 
Join Date: Dec 2004
Posts: 19
Thanks: 0
Thanked 0 Times in 0 Posts
Default Calendar Problem

Hi all,

I have an issue with my calendar where if I select the next month (feb) my calendar gives the following error message.

Microsoft VBScript runtime error '800a0009'
Subscript out of range: '32'
/ccl/default.asp, line 156

I am able to view all other months with the exception of moving from january to february. The following code is from the where the error message says it is occuring. Any help would be appreciated.

do until objRs.EOF
    if day(objRs("dte")) = tmpDay then
            lnk = "<a href=diary_view.asp?id=" & objRs("id") & " style='color:" & objRs("colour") & _
                "; background:" & objRs("BgColour") & ";" & "font-family:verdana;font-size:8pt;line-height:15px' title='" & cdate(objRs("dte")) & "'>" &_
                objRs("text_field") & "</a>"

            dictDte(intCount-1, 1) = dictDte(intCount-1, 1) & "<br>" & lnk
               tmpDay = day(objRs("dte"))
            objRs.Movenext
    Else
        if Day(objRs("dte")) = intCount + 1 then
            lnk = "<a href=diary_view.asp?id=" & objRs("id") & " style='color:" & objRs("colour") & _
                "; background-color:" & objRs("BgColour") & ";" & "font-family:verdana;font-size:8pt;line-height:15px' title='" & cdate(objRs("dte")) & "'>" &_
                objRs("text_field") & "</a>"
            dictDte(intCount, 1) = lnk
            tmpDay = day(objRs("dte"))
            objRs.Movenext
            intCount = intCount + 1
        Else
            dictDte(intCount, 1) = " "
            intCount = intCount + 1
        End If
        dictDte(intCount, 2) = intCount + 1 <------Line 156
    End if
loop

again, any help, please.

Thanks

Mike
__________________
Mike
 
Old February 9th, 2005, 04:23 PM
Registered User
 
Join Date: Feb 2005
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I have EXACTLY the same problem....I hope you/we get an answer!!

 
Old February 15th, 2005, 11:28 PM
Authorized User
 
Join Date: Dec 2004
Posts: 19
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Yes found problem, unfortunately it has to do with calendar having problem with SQL. Set back to using MS Access and it is working fine for me.
My guess it is february having only 28 days. Calendar set to add or subtract a day and it is trying to add a day to a month it thinks has 31 days.

Mike





Similar Threads
Thread Thread Starter Forum Replies Last Post
Calendar like calendar in AJAX in ASP.NET h@ckerz ASP.NET 2.0 Professional 0 February 19th, 2008 12:56 AM
problem in calendar visibility premnaath ASP.NET 2.0 Professional 1 November 16th, 2007 09:25 AM
Calendar problem in ASP heba ASP.NET 2.0 Professional 1 June 5th, 2007 08:42 AM
Problem with Calendar Control in VBA narendrapawar VB How-To 0 December 16th, 2004 09:08 AM





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