RS.Close
means you cannot access the RS after the close.
http://www.learnasp.com/learn/propertyexpense.asp
is best solution
On 9/8/05, Ananda Rajeurs <[EMAIL PROTECTED]> wrote:
>
> Hello,
>
> I am getting this error.
>
> error '80020009'
> /courseeval/business/summary1.asp, line 249
>
> my code is
>
> Sub GetAnswerPlus(QC)
> Dim ANSWERS(), Acount
> Dim QTYP
> Dim X, I, J
> QTYP = Question(2,QC)
> ' Say "Question " & QC & " has type " & QTYP & "<BR>"
> SQL = "SELECT * FROM QVAL Summary WHERE QVALQTYPID = " & QTYP & ";"
> Set RS = AC.Execute(SQL)
> Acount = 0
> Do while not(RS.EOF)
> Acount = Acount + 1
> ReDim Preserve ANSWERS(2, Acount)
> ANSWERS(1,Acount) = RS("QVALDesc")
> RS.MoveNext
> Loop
> ' Say "Acount was " & Acount & "<BR>"
> RS.Close
> ' Say "Count is " & COUNT & "<br>"
> For X = 1 to COUNT
> RESP = RESPID(X)
> SQL = "SELECT * FROM Summary WHERE XFRQQUESID = " & QC & " "
> SQL = SQL & " AND XFRQRESPID = " & RESP & " "
> SQL = SQL & " AND QVALID <> 23;"
> Set RS = AC.Execute(SQL)
> ' If RS.EOF Then
> ' Say "N/R" & "<BR>"
> ' Else
> ' Say "<b>" & RS("QVALDesc") & "</b><BR>"
> ' End if
> For I = 1 to ACount
> If RS("QVALDesc") = ANSWERS(1,I) Then ---------->error line
> ANSWERS(2,I) = ANSWERS(2,I) + 1
> Exit For
> End If
> Next
> RS.Close
> ' Say SQL & "<br>"
> Next
> Say "<Table width=100% border=0>"
> For I = 1 to Acount
> J = CInt(ANSWERS(2,I))
> Say "<TR>"
> Say "<td width=50% class=left>" & ANSWERS(1,I) & "</td>"
> If J > 0 then
> Say "<td width=40% class=left><b>" & Int(((J)/Count)*100) & "%</b></td>"
> Else
> Say "<td width=40% class=left> </td>"
> End if
> Say "<td width=10% class=left>" & J & "</td>"
> Say "</tr>"
> ' Say ANSWERS(1,I) & ": " & J & " " & Int(((J)/Count)*100) & "%<BR>"
> Next
> Say "</table>"
> End Sub
>
>
>
> Can anybody help with my code.
>
>
>
> \\ ~ ~ //
> ( @ @ )
> OOo-(_)-oOO
>
> Ananda V Rajeurs
> __________________________________________________
> Do You Yahoo!?
> Tired of spam? Yahoo! Mail has the best spam protection around
> http://mail.yahoo.com
>
> [Non-text portions of this message have been removed]
>
>
>
> SPONSORED LINKS
> Basic programming
> language<http://groups.yahoo.com/gads?t=ms&k=Basic+programming+language&w1=Basic+programming+language&w2=Computer+programming+languages&w3=Programming+languages&w4=Java+programming+language&w5=The+history+of+computer+programming+language&c=5&s=176&.sig=clJRDppRYABhs6xUhzokKw>
> Computer
> programming
> languages<http://groups.yahoo.com/gads?t=ms&k=Computer+programming+languages&w1=Basic+programming+language&w2=Computer+programming+languages&w3=Programming+languages&w4=Java+programming+language&w5=The+history+of+computer+programming+language&c=5&s=176&.sig=RiWZhYTiihJ1rWfeFgB2sg>
> Programming
> languages<http://groups.yahoo.com/gads?t=ms&k=Programming+languages&w1=Basic+programming+language&w2=Computer+programming+languages&w3=Programming+languages&w4=Java+programming+language&w5=The+history+of+computer+programming+language&c=5&s=176&.sig=2BgLsjKfGvxPndstKBMU9g>
> Java
> programming
> language<http://groups.yahoo.com/gads?t=ms&k=Java+programming+language&w1=Basic+programming+language&w2=Computer+programming+languages&w3=Programming+languages&w4=Java+programming+language&w5=The+history+of+computer+programming+language&c=5&s=176&.sig=4wWSX5WKx7BCK9SrMVdrxQ>
> The
> history of computer programming
> language<http://groups.yahoo.com/gads?t=ms&k=The+history+of+computer+programming+language&w1=Basic+programming+language&w2=Computer+programming+languages&w3=Programming+languages&w4=Java+programming+language&w5=The+history+of+computer+programming+language&c=5&s=176&.sig=iNvYp6cfd9HwtDhK1iV-rg>
>
> ------------------------------
> YAHOO! GROUPS LINKS
>
>
> - Visit your group
> "AspClassicAnyQuestionIsOk<http://groups.yahoo.com/group/AspClassicAnyQuestionIsOk>"
>
> on the web.
> - To unsubscribe from this group, send an email to:
> [EMAIL PROTECTED]<[EMAIL PROTECTED]>
> - Your use of Yahoo! Groups is subject to the Yahoo! Terms of
> Service <http://docs.yahoo.com/info/terms/>.
>
>
> ------------------------------
>
[Non-text portions of this message have been removed]
------------------------ Yahoo! Groups Sponsor --------------------~-->
Fair play? Video games influencing politics. Click and talk back!
http://us.click.yahoo.com/T8sf5C/tzNLAA/TtwFAA/saFolB/TM
--------------------------------------------------------------------~->
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/AspClassicAnyQuestionIsOk/
<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/