Advertisement

12.11.2003 at 09:48AM PST, ID: 20823206
[x]
Attachment Details

Help with error '80020009' exception occured ASP code to display records order by month and day descending

Asked by groovymonkey in Active Server Pages (ASP)

Tags: error, 80020009, asp

I have the following code which pulls links from a database and displays them with month and day descending...grouped by month.  The output looks something like this

December

2003-12-11
some link here

2003-12-05
some link here

November
.....etc

The code is working but breaks once the last record is reached...this is when I get the error code...

error '80020009'
Exception occurred.

the error refers to this particular line of code

      Do while objChronoRS("month") = lTempMonth


Anyways here is the code...
objConn.Open
                  DIM myChrono
                  Set objChronoRS= Server.CreateObject("ADODB.Recordset")
                  myChrono = "SELECT * From mediaroom WHERE year="+vYear+" AND class='" & vClass & "' order by month DESC,day DESC"
                  objChronoRS.Open myChrono, objConn, 1, 3

                 Dim lTempMonth
                 lTempMonth = 0
     
                 Do while not objChronoRS.eof
                        lTempMonth = objChronoRS("month")  
                               
                              if objChronoRS("month")= 12 then
                                    response.write("<h2>")
                                    response.write("December")
                                    response.write("</h2>")
                              elseif objChronoRS("month")= 11 then
                                    response.write("<h2>")
                                    response.write("November")
                                    response.write("</h2>")
                              elseif objChronoRS("month")= 10 then
                                    response.write("<h2>")
                                    response.write("October")
                                    response.write("</h2>")
                              elseif objChronoRS("month")= 9 then
                                    response.write("<h2>")
                                    response.write("September")
                                    response.write("</h2>")
                              elseif objChronoRS("month")= 8 then
                                    response.write("<h2>")
                                    response.write("August")
                                    response.write("</h2>")
                              elseif objChronoRS("month")= 7 then
                                    response.write("<h2>")
                                    response.write("July")
                                    response.write("</h2>")
                              elseif objChronoRS("month")= 6 then
                                    response.write("<h2>")
                                    response.write("June")
                                    response.write("</h2>")
                              elseif objChronoRS("month")= 5 then
                                    response.write("<h2>")
                                    response.write("May")
                                    response.write("</h2>")
                              elseif objChronoRS("month")= 4 then
                                    response.write("<h2>")
                                    response.write("April")
                                    response.write("</h2>")
                              elseif objChronoRS("month")= 3 then
                                    response.write("<h2>")
                                    response.write("March")
                                    response.write("</h2>")
                              elseif objChronoRS("month")= 2 then
                                    response.write("<h2>")
                                    response.write("February")
                                    response.write("</h2>")
                              elseif objChronoRS("month")= 1 then
                                    response.write("<h2>")
                                    response.write("January")
                                    response.write("</h2>")
                              end if
                                          
                        Do while objChronoRS("month") = lTempMonth
                              'print other details for that month here
                              vMonth=objChronoRS("month")
                              vYear=objChronoRS("year")
                              link=objChronoRS("link")
                              vDay=objChronoRS("day")
                              response.write("<p>")
                              response.write(vYear)
                              response.write("-")
                              if vMonth < 10 then
                              response.write("0")
                              response.write(vMonth)
                              else
                              response.write(vMonth)
                              end if
                              response.write("-")
                              if vDay < 10 then
                              response.write("0")
                              response.write(vDay)
                              else
                              response.write(vDay)
                              end if
                              response.write("<br>")
                              response.write(link)
                              response.write("<br>")
                              objChronoRS.movenext()
                      Loop
                 Loop

                  objChronoRS.Close
                  Set objChronoRS = Nothing
                  objConn.Close
                  end if

thanks groovymonkeyStart Free Trial
[+][-]12.11.2003 at 09:53AM PST, ID: 9921795

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]12.11.2003 at 09:56AM PST, ID: 9921821

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]12.11.2003 at 10:22AM PST, ID: 9922028

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]12.11.2003 at 11:33AM PST, ID: 9922618

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]12.11.2003 at 11:58AM PST, ID: 9922802

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]12.11.2003 at 12:44PM PST, ID: 9923210

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zone: Active Server Pages (ASP)
Tags: error, 80020009, asp
Sign Up Now!
Solution Provided By: kingsfan76
Participating Experts: 4
Solution Grade: A
 
 
[+][-]12.12.2003 at 02:03AM PST, ID: 9927161

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]12.16.2003 at 05:23AM PST, ID: 9948824

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]12.16.2003 at 11:50AM PST, ID: 9951651

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]10.16.2004 at 01:02AM PDT, ID: 12326400

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32